summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlphaJack2022-10-17 10:32:28 +0200
committerAlphaJack2022-10-17 10:32:28 +0200
commit4c67d0e5d0879f816b8cad45468903669d218c2d (patch)
treefc6f594180a15a6bbf3a19286d7526542902e4a5
parent1d23e6bc27a8e437e97bd2817c13b85841fed761 (diff)
downloadaur-4c67d0e5d0879f816b8cad45468903669d218c2d.tar.gz
Added building steps for all binaries
-rw-r--r--.SRCINFO2
-rw-r--r--PKGBUILD27
2 files changed, 18 insertions, 11 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 04790fc54e4a..89e316ce2b4e 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = dendrite
pkgdesc = A second-generation Matrix homeserver written in Go
pkgver = 0.10.3
- pkgrel = 1
+ pkgrel = 2
url = https://matrix-org.github.io/dendrite/
install = dendrite.install
arch = x86_64
diff --git a/PKGBUILD b/PKGBUILD
index cd20121915af..bffb19132956 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -3,7 +3,7 @@
pkgname="dendrite"
pkgver=0.10.3
-pkgrel=1
+pkgrel=2
pkgdesc="A second-generation Matrix homeserver written in Go"
url="https://matrix-org.github.io/dendrite/"
license=("Apache")
@@ -27,10 +27,13 @@ build(){
export CGO_CXXFLAGS="${CXXFLAGS}"
export CGO_LDFLAGS="${LDFLAGS}"
export GOFLAGS="-buildmode=pie -trimpath -ldflags=-linkmode=external -mod=readonly -modcacherw"
- go build "./cmd/dendrite-monolith-server"
- go build "./cmd/generate-config"
- go build "./cmd/generate-keys"
- go build "./cmd/create-account"
+ install -d -m 755 "bin"
+ cd "bin"
+ rm -r "../cmd/$pkgname-polylith-multi/"
+ for dir in "../cmd/"*/; do
+ go build "$dir"
+ echo "[OK] built $(basename "$dir")"
+ done
}
check(){
@@ -40,15 +43,19 @@ check(){
export CGO_CXXFLAGS="${CXXFLAGS}"
export CGO_LDFLAGS="${LDFLAGS}"
export GOFLAGS="-buildmode=pie -trimpath -ldflags=-linkmode=external -mod=readonly -modcacherw"
- go test "./cmd/dendrite-monolith-server"
+ go test "./cmd/$pkgname-monolith-server"
}
package(){
cd "$pkgname-$pkgver"
- install -D -m 755 "$pkgname-monolith-server" "$pkgdir/usr/bin/$pkgname"
- install -D -m 755 "generate-config" "$pkgdir/usr/bin/$pkgname-generate-config"
- install -D -m 755 "generate-keys" "$pkgdir/usr/bin/$pkgname-generate-keys"
- install -D -m 755 "create-account" "$pkgdir/usr/bin/$pkgname-create-account"
+ for bin in "bin"/*; do
+ if [[ "$bin" =~ .*$pkgname* ]]; then
+ install -D -m 755 "$bin" "$pkgdir/usr/bin/$(basename "$bin")"
+ else
+ install -D -m 755 "$bin" "$pkgdir/usr/bin/$pkgname-$(basename "$bin")"
+ fi
+ done
+ mv "$pkgdir/usr/bin/$pkgname-monolith-server" "$pkgdir/usr/bin/$pkgname"
install -d -m 750 "$pkgdir/etc/$pkgname"
install -D -m 644 "$pkgname-sample.monolith.yaml" "$pkgdir/etc/$pkgname/config-example.yaml"
install -D -m 644 "$srcdir/$pkgname.service" "$pkgdir/usr/lib/systemd/system/$pkgname.service"