Skip to content

Commit

Permalink
Add emaj
Browse files Browse the repository at this point in the history
  • Loading branch information
Evan Stanton authored and Evan Stanton committed Nov 10, 2023
1 parent 67cf073 commit b89a7ca
Show file tree
Hide file tree
Showing 2 changed files with 59 additions and 0 deletions.
37 changes: 37 additions & 0 deletions contrib/emaj/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# Set the PostgreSQL version
ARG PG_VERSION=15
FROM quay.io/coredb/c-builder:pg${PG_VERSION}
USER root

# Extension build dependencies
RUN apt-get update && apt-get install -y \
build-essential \
libreadline-dev \
zlib1g-dev \
flex \
bison \
libxml2-dev \
libxslt-dev \
libssl-dev \
libxml2-utils \
xsltproc \
ccache \
python3 \
python3-dev \
python3-setuptools \
python3-pip && \
apt-get clean && rm -rf /var/lib/apt/lists/*

# Define the version of E-Maj to install
ARG EMAJ_VERSION=4.3.1

# Download and unpack E-Maj
RUN wget https://api.pgxn.org/dist/e-maj/${EMAJ_VERSION}/e-maj-${EMAJ_VERSION}.zip && \
unzip e-maj-${EMAJ_VERSION}.zip && \
rm e-maj-${EMAJ_VERSION}.zip

# Copy the necessary files to the PostgreSQL extension directory
RUN SHAREDIR=$(pg_config --sharedir) && \
cp e-maj-${EMAJ_VERSION}/emaj.control ${SHAREDIR}/extension/ && \
cp e-maj-${EMAJ_VERSION}/sql/emaj--* ${SHAREDIR}/extension/ && \
rm -r e-maj-${EMAJ_VERSION}
22 changes: 22 additions & 0 deletions contrib/emaj/Trunk.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
[extension]
name = "emaj"
version = "4.3.1"
repository = "https://github.com/dalibo/emaj"
license = "GNU General Public License"
description = "Track updates on tables sets with rollback capabilities."
homepage = "https://www.dalibo.com/en/"
documentation = "https://emaj.readthedocs.io/en/latest/"
categories = ["auditing_logging"]

[build]
postgres_version = "15"
platform = "linux/amd64"
dockerfile = "Dockerfile"
install_command = """
wget https://api.pgxn.org/dist/e-maj/4.3.1/e-maj-4.3.1.zip && \
unzip e-maj-4.3.1.zip && \
cd e-maj-4.3.1 && \
SHAREDIR=$(pg_config --sharedir) && \
cp emaj.control ${SHAREDIR}/extension/ && \
cp sql/emaj--* ${SHAREDIR}/extension/
"""

0 comments on commit b89a7ca

Please sign in to comment.