diff options
author | ed | 2023-12-07 11:10:24 -0600 |
---|---|---|
committer | ed | 2023-12-07 11:10:24 -0600 |
commit | c255929d3d32251ee45e18cfb9c9820222d1ccdc (patch) | |
tree | 91c5d7c42205adc47f004e1ea107a77c234986f2 /PKGBUILD | |
download | aur-pgxman.tar.gz |
create pgxman AUR package
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..073f5c6109aa --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,39 @@ +# Maintainer: Ed <me at edzz dot de> +pkgname=pgxman +pkgver=1.0.1 +pkgrel=1 +pkgdesc='PostgreSQL Extension Manager' +arch=('x86_64') +url="https://pgxman.com/" +license=('FSL-1.0-Apache-2.0') +makedepends=('go') +source=("https://github.com/$pkgname/$pkgname/archive/refs/tags/v$pkgver.tar.gz") +sha256sums=('71f0986df8922df67fe20122776d6d46e7877233e3c52df3761f86d364c77a66') + +prepare(){ + cd "$pkgname-$pkgver" + mkdir -p build/ +} + +build() { + cd "$pkgname-$pkgver" + export CGO_CPPFLAGS="${CPPFLAGS}" + export CGO_CFLAGS="${CFLAGS}" + export CGO_CXXFLAGS="${CXXFLAGS}" + export CGO_LDFLAGS="${LDFLAGS}" + export GOFLAGS="-buildmode=pie -trimpath -ldflags=-linkmode=external -mod=readonly -modcacherw" + go build -o build/pgxman ./cmd/pgxman + go build -o build/pgxman-pack ./cmd/pgxman-pack +} + +check() { + cd "$pkgname-$pkgver" + go test $(go list ./... | grep -v e2etest) -count=1 -v +} + +package() { + cd "$pkgname-$pkgver" + install -Dm755 build/pgxman "$pkgdir"/usr/bin/pgxman + install -Dm755 build/pgxman-pack "$pkgdir"/usr/bin/pgxman-pack +} + |