diff --git a/contrib/pg_proctab/Dockerfile b/contrib/pg_proctab/Dockerfile new file mode 100644 index 00000000..03f37522 --- /dev/null +++ b/contrib/pg_proctab/Dockerfile @@ -0,0 +1,31 @@ +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 + +# Clone repository +RUN git clone https://github.com/postgres/postgres.git + +ARG PG_VERSION=15 + +# Build extension +RUN cd postgres && \ + git fetch origin REL_${PG_VERSION}_STABLE && \ + git checkout REL_${PG_VERSION}_STABLE && \ + ./configure && \ + cd contrib && \ + git clone https://gitlab.com/pg_proctab/pg_proctab.git && \ + cd pg_proctab && \ + make USE_PGXS=1 diff --git a/contrib/pg_proctab/Trunk.toml b/contrib/pg_proctab/Trunk.toml new file mode 100644 index 00000000..3197e376 --- /dev/null +++ b/contrib/pg_proctab/Trunk.toml @@ -0,0 +1,20 @@ +[extension] +name = "pg_proctab" +version = "0.0.10" +repository = "https://gitlab.com/pg_proctab/pg_proctab/-/tree/main/" +license = "Copyright" +description = "Access operating system process table." +homepage = "https://pg_proctab.gitlab.io/" +documentation = "https://gitlab.com/pg_proctab/pg_proctab/-/tree/main/" +categories = ["metrics"] + +[build] +postgres_version = "15" +platform = "linux/amd64" +dockerfile = "Dockerfile" +install_command = """ + cd postgres/contrib/pg_proctab && make USE_PGXS=1 install + set -x + mv /usr/local/pgsql/share/extension/* /usr/share/postgresql/15/extension + mv /usr/local/pgsql/lib/* /usr/lib/postgresql/15/lib + """