# Contributor: Michał Polański # Maintainer: Michał Polański pkgname=soju pkgver=0.6.2 pkgrel=5 pkgdesc="User-friendly IRC bouncer" url="https://soju.im/" license="AGPL-3.0" arch="all" pkgusers="$pkgname" pkggroups="$pkgname" install="$pkgname.pre-install" depends="ca-certificates" 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 config.patch makefile.patch " builddir="$srcdir/$pkgname-v$pkgver" _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 GOFLAGS="$GOFLAGS" for util in $_utils; do cd "$builddir"/contrib/$util go build -o "$builddir"/ done } check() { go test ./... } package() { make DESTDIR="$pkgdir" PREFIX=/usr install install -Dm755 "$srcdir"/$pkgname.initd "$pkgdir"/etc/init.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=" ab6fb2d5122b68bf6d5a60d720d2c729009cafc3b82163e4021e9fe66f84c216576b040b5e04eaf6e114ab74b4f1dbedacf627a47ade6cdb617f96b824c9e7c8 soju-0.6.2.tar.gz 1f09a8d7eea73d5d81cdcad8a3a78fe30fc19742c13042ad2ee0448edf4108b2daf7da6fbbd4141b23fe1abd9cb931303efa6440d281a954e5d6d4956a291f7e soju.initd 2f09bdb2efd0cd2f5f138dac7d5a4d02cfee6c46fc103c30fa70a238f322617b53ffd4b6ce6d0a8410375dd7229a68dcd6318e2b9651c5b559fff70fbca7adb3 config.patch b647576f50ab03a90d9ab9062d97ecf050fd6e7eeba77200e05e4577733886a4ca85c7cef68d476fc611bfca41f01eecca7d3f8ce8d03431872ccb78ea2f64db makefile.patch "