diff options
Diffstat (limited to 'testing/soju/APKBUILD')
-rw-r--r-- | testing/soju/APKBUILD | 48 |
1 files changed, 32 insertions, 16 deletions
diff --git a/testing/soju/APKBUILD b/testing/soju/APKBUILD index ee7074ea862..63c9b595a73 100644 --- a/testing/soju/APKBUILD +++ b/testing/soju/APKBUILD @@ -1,32 +1,39 @@ # Contributor: Michał Polański <michal@polanski.me> # Maintainer: Michał Polański <michal@polanski.me> pkgname=soju -pkgver=0.2.2 -pkgrel=1 +pkgver=0.7.0 +pkgrel=2 pkgdesc="User-friendly IRC bouncer" url="https://soju.im/" license="AGPL-3.0" arch="all" -options="chmod-clean" pkgusers="$pkgname" pkggroups="$pkgname" install="$pkgname.pre-install" depends="ca-certificates" -makedepends="go scdoc libcap" -subpackages="$pkgname-openrc $pkgname-doc" +makedepends="go scdoc sqlite-dev" +subpackages="$pkgname-openrc $pkgname-doc $pkgname-utils" source="$pkgname-$pkgver.tar.gz::https://git.sr.ht/~emersion/soju/archive/v$pkgver.tar.gz $pkgname.initd - $pkgname.confd config.patch makefile.patch " builddir="$srcdir/$pkgname-v$pkgver" -export GOPATH="$srcdir" -export GOFLAGS="$GOFLAGS -trimpath" +_utils="migrate-db migrate-logs znc-import" + +export GOFLAGS="$GOFLAGS -tags=libsqlite3" +export GOCACHE="${GOCACHE:-"$srcdir/go-cache"}" +export GOTMPDIR="${GOTMPDIR:-"$srcdir"}" +export GOMODCACHE="${GOMODCACHE:-"$srcdir/go"}" build() { - make + make GOFLAGS="$GOFLAGS" + + for util in $_utils; do + cd "$builddir"/contrib/$util + go build -o "$builddir"/ + done } check() { @@ -35,19 +42,28 @@ check() { package() { make DESTDIR="$pkgdir" PREFIX=/usr install - setcap cap_net_bind_service=+ep "$pkgdir"/usr/bin/soju install -Dm755 "$srcdir"/$pkgname.initd "$pkgdir"/etc/init.d/$pkgname - install -Dm644 "$srcdir"/$pkgname.confd "$pkgdir"/etc/conf.d/$pkgname # add additional docs install -Dm644 -t "$pkgdir"/usr/share/doc/$pkgname doc/*.md + + for util in $_utils; do + install -Dm755 $util "$pkgdir"/usr/bin/soju-$util + done +} + +utils() { + pkgdesc="Utilities for soju" + + for util in $_utils; do + amove usr/bin/soju-$util + done } sha512sums=" -4cb798e625dff5455d666edba6a3a748c2d9f1250fea83d98ef3da558ddb99df6069b215107786924c10ad374e8914f29c47a4d8bec4b9907d249186838bcca4 soju-0.2.2.tar.gz -c717e56a732baee3686c3cdc94dce5ad27b66e952a20e26a7d9533309edc9b45a85a85346e3ff47da700952218d61a7df8572eeddf6eed166e541a5a81cf7371 soju.initd -daca27e5deb5135b406e4160504efa011219147465c2f2b484b92db0aa9174173e37c62d32109937df3d2e8c430625e0ec25956775dd92f7fa1f55b19e0e8a18 soju.confd -48b0192bc385da4fe8c801612aed6b85accb84b9435f8f590b251bbeb1362567da6676e487ba6535561050a42efa84d9a712dc843482190ccd1483c0e2f12fa8 config.patch -599a809aa78406bc029ee63b4e7a8e8825972a397626529adce75c38c27f3d2b326335cac287b251344775f8735a9a47c8e35545df33a9d659d3ddac1bb575d5 makefile.patch +970563b873d872a99eb2f5965d6ef8f138b3f608b484173ad68a97181777199a7427b4439a2ffa2431165fd03cfe422e86257a68f937d8a24368ca239d9666da soju-0.7.0.tar.gz +1f09a8d7eea73d5d81cdcad8a3a78fe30fc19742c13042ad2ee0448edf4108b2daf7da6fbbd4141b23fe1abd9cb931303efa6440d281a954e5d6d4956a291f7e soju.initd +2f09bdb2efd0cd2f5f138dac7d5a4d02cfee6c46fc103c30fa70a238f322617b53ffd4b6ce6d0a8410375dd7229a68dcd6318e2b9651c5b559fff70fbca7adb3 config.patch +b647576f50ab03a90d9ab9062d97ecf050fd6e7eeba77200e05e4577733886a4ca85c7cef68d476fc611bfca41f01eecca7d3f8ce8d03431872ccb78ea2f64db makefile.patch " |