Skip to content

Commit

Permalink
Compile libre2-dev for Ubuntu 22.04
Browse files Browse the repository at this point in the history
GitHub: mudge/re2#65

From release 2023-07-01, re2 now requires Abseil (libabsl-dev) which is
only available by default on Ubuntu 22.04. As older versions of re2
compiled on Ubuntu 20.04 should continue to work, we'll continue to use
those even on newer GitHub Actions runners.
  • Loading branch information
mudge committed Jul 4, 2023
1 parent 853bf95 commit c0bf5ed
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 0 deletions.
14 changes: 14 additions & 0 deletions libre2-dev/22.04/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
FROM ubuntu:22.04

RUN apt-get update

RUN DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends tzdata

RUN apt-get install -y \
ruby ruby-dev rubygems build-essential git curl cmake libabsl-dev pkg-config

RUN gem install --no-document fpm

COPY entrypoint.sh /entrypoint.sh

ENTRYPOINT ["/entrypoint.sh"]
15 changes: 15 additions & 0 deletions libre2-dev/22.04/entrypoint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/bin/bash
set -euo pipefail

re2_release=$1
version=$2

# Download the re2 release from GitHub
curl -L "https://github.com/google/re2/archive/${re2_release}.tar.gz" | tar xz
cd "re2-${re2_release}"

# Compile and install the release
make install prefix=/usr DESTDIR=/tmp/installdir

# Package up the release with fpm
fpm -s dir -t deb -n libre2-dev -v "${version}" -C /tmp/installdir --replaces libre2-5 -d libabsl20210324 usr/include usr/lib

0 comments on commit c0bf5ed

Please sign in to comment.