mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2026-05-05 04:16:46 +02:00
testing/postgresql-pgmq: new aport
This commit is contained in:
parent
a9c1ba8690
commit
9f9405dc7b
66
testing/postgresql-pgmq/APKBUILD
Normal file
66
testing/postgresql-pgmq/APKBUILD
Normal file
@ -0,0 +1,66 @@
|
||||
# Contributor: Jakub Jirutka <jakub@jirutka.cz>
|
||||
# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
|
||||
pkgname=postgresql-pgmq
|
||||
pkgver=1.1.0
|
||||
pkgrel=0
|
||||
pkgdesc="A lightweight message queue, like AWS SQS and RSMQ, but on PostgreSQL"
|
||||
url="https://github.com/tembo-io/pgmq"
|
||||
# ppc64le,riscv64,s390x: fails to build due to ring crate (https://github.com/pgcentralfoundation/pgrx/pull/1442)
|
||||
arch="all !ppc64le !riscv64 !s390x"
|
||||
license="PostgreSQL"
|
||||
makedepends="
|
||||
cargo
|
||||
chrpath
|
||||
jq
|
||||
openssl-dev
|
||||
postgresql
|
||||
postgresql-dev
|
||||
rustfmt
|
||||
"
|
||||
source="https://github.com/tembo-io/pgmq/archive/v$pkgver/postgresql-pgmq-$pkgver.tar.gz"
|
||||
builddir="$srcdir/pgmq-$pkgver"
|
||||
# check: tests tries to write to /usr/lib/...
|
||||
# net: fetches crates in build phase
|
||||
options="!check net"
|
||||
|
||||
export PGRX_HOME="$srcdir/.pgrx"
|
||||
|
||||
prepare() {
|
||||
default_prepare
|
||||
|
||||
cargo fetch --target="$CTARGET" --locked
|
||||
}
|
||||
|
||||
build() {
|
||||
local pgver="$(pg_config --major-version)"
|
||||
|
||||
# We must install it this way because cargo-pgrx and pgrx dependency
|
||||
# versions in the project must be identical. :(
|
||||
local pgrx_ver; pgrx_ver="$(cargo metadata --locked --format-version 1 \
|
||||
| jq -r '.packages[] | select(.name == "pgrx") | .version')"
|
||||
# Use dev profile to speed-up compilation.
|
||||
cargo install --locked --profile dev --bins --root target/tools "cargo-pgrx@$pgrx_ver"
|
||||
|
||||
export PATH="$PWD/target/tools/bin:$PATH"
|
||||
|
||||
cargo pgrx init --pg$pgver="$(which pg_config)"
|
||||
|
||||
# TODO: Remove after >0.11.2 is released (https://github.com/pgcentralfoundation/pgrx/pull/1441).
|
||||
[ -n "$RUSTFLAGS" ] && export RUSTFLAGS="$(echo $RUSTFLAGS)" || unset RUSTFLAGS
|
||||
cargo pgrx package --verbose --out-dir="target/release/dist"
|
||||
|
||||
# Remove RPATH.
|
||||
# NOTE: CARGO_PROFILE_RELEASE_RPATH=false doesn't work here.
|
||||
chrpath -d target/release/dist/usr/lib/postgresql*/*.so
|
||||
}
|
||||
|
||||
package() {
|
||||
depends="postgresql$(pg_config --major-version)"
|
||||
|
||||
mkdir -p "$pkgdir"
|
||||
cp -r target/release/dist/* "$pkgdir"/
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
216f453c10021897fe567b55646e2b7e70b5b36cdb3d2b8d5171db1757e0333f201cb23ff49e7b3a510c61c64d3ac1aaf990c0c23bc6947d3734787357b84ed6 postgresql-pgmq-1.1.0.tar.gz
|
||||
"
|
||||
Loading…
x
Reference in New Issue
Block a user