diff options
author | Thorben Günther | 2020-06-08 03:28:39 +0200 |
---|---|---|
committer | Thorben Günther | 2020-06-08 03:28:39 +0200 |
commit | 185e421abad546be5e855c407c44c72695a41278 (patch) | |
tree | 028b28c1b9b7ac0c27f6107b22feb2c8b70866fd | |
download | aur-185e421abad546be5e855c407c44c72695a41278.tar.gz |
Initial upload: soju-git r323.d0cf1d2-1
-rw-r--r-- | .SRCINFO | 24 | ||||
-rw-r--r-- | PKGBUILD | 51 | ||||
-rw-r--r-- | soju.install | 5 | ||||
-rw-r--r-- | soju.service | 12 | ||||
-rw-r--r-- | soju.sysusers | 1 | ||||
-rw-r--r-- | soju.tmpfiles | 1 |
6 files changed, 94 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..46b07ad679e7 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,24 @@ +pkgbase = soju-git + pkgdesc = A user-friendly IRC bouncer + pkgver = r323.d0cf1d2 + pkgrel = 1 + url = https://sr.ht/~emersion/soju/ + install = soju.install + arch = x86_64 + license = AGPL3 + makedepends = git + makedepends = go + makedepends = scdoc + provides = soju + conflicts = soju + source = soju::git+https://git.sr.ht/~emersion/soju + source = soju.sysusers + source = soju.service + source = soju.tmpfiles + sha256sums = SKIP + sha256sums = c050d3f376f43e1cc22e75f445027862df8d09230e18cbb0913ab58ddced78aa + sha256sums = bdaac5cbbb59a9e8a73fa9956196412315d5fb6ba69abde3a5649cef7028e2f2 + sha256sums = 8ad78b224cf570e09c7f95d2a4e89c83449c9715ceaaecedcc81c56be812ee77 + +pkgname = soju-git + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..83c0b7edc532 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,51 @@ +# Maintainer: Thorben Günther <echo YWRtaW5AeGVucm94Lm5ldAo= | base64 -d> + +pkgname=soju-git +_pkgname=soju +pkgver=r323.d0cf1d2 +pkgrel=1 +pkgdesc='A user-friendly IRC bouncer' +arch=('x86_64') +url='https://sr.ht/~emersion/soju/' +license=('AGPL3') +makedepends=('git' 'go' 'scdoc') +install=$_pkgname.install +provides=('soju') +conflicts=('soju') +source=( + "$_pkgname::git+https://git.sr.ht/~emersion/${_pkgname}" + "soju.sysusers" + "soju.service" + "soju.tmpfiles" +) +sha256sums=('SKIP' + 'c050d3f376f43e1cc22e75f445027862df8d09230e18cbb0913ab58ddced78aa' + 'bdaac5cbbb59a9e8a73fa9956196412315d5fb6ba69abde3a5649cef7028e2f2' + '8ad78b224cf570e09c7f95d2a4e89c83449c9715ceaaecedcc81c56be812ee77') + +pkgver() { + cd "$srcdir/$_pkgname" + ( + set -o pipefail + git describe --long 2>/dev/null | sed 's/\([^-]*-g\)/r\1/;s/-/./g' || + printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" + ) +} + +build() { + cd "$srcdir/$_pkgname" + export CGO_LDFLAGS="${LDFLAGS}" + export CGO_CFLAGS="${CFLAGS}" + export CGO_CPPFLAGS="${CPPFLAGS}" + export CGO_CXXFLAGS="${CXXFLAGS}" + export GOFLAGS="-buildmode=pie -trimpath -mod=readonly -modcacherw" + make PREFIX=/usr VERSION="$(pkgver)" +} + +package() { + cd "$srcdir/$_pkgname" + make PREFIX=/usr DESTDIR=$pkgdir install + install -Dm644 "$srcdir/$_pkgname.sysusers" "$pkgdir/usr/lib/sysusers.d/$_pkgname.conf" + install -Dm644 "$srcdir/$_pkgname.service" "$pkgdir/usr/lib/systemd/system/$_pkgname.service" + install -Dm644 "$srcdir/$_pkgname.tmpfiles" "$pkgdir/usr/lib/tmpfiles.d/$_pkgname.conf" +} diff --git a/soju.install b/soju.install new file mode 100644 index 000000000000..28ad0eb0c41d --- /dev/null +++ b/soju.install @@ -0,0 +1,5 @@ +#/bin/bash + +post_install() { + echo '==> Create /var/lib/soju/soju.config ('man soju')' +} diff --git a/soju.service b/soju.service new file mode 100644 index 000000000000..ba900b988867 --- /dev/null +++ b/soju.service @@ -0,0 +1,12 @@ +[Unit] +Description=soju IRC bouncer service +After=network.target + +[Service] +Type=simple +User=soju +Restart=always +ExecStart=/usr/bin/soju --config /var/lib/soju/soju.config + +[Install] +WantedBy=multi-user.target diff --git a/soju.sysusers b/soju.sysusers new file mode 100644 index 000000000000..5d6293634237 --- /dev/null +++ b/soju.sysusers @@ -0,0 +1 @@ +u soju - "soju user" /var/lib/soju diff --git a/soju.tmpfiles b/soju.tmpfiles new file mode 100644 index 000000000000..6d38e0c170d9 --- /dev/null +++ b/soju.tmpfiles @@ -0,0 +1 @@ +d /var/lib/soju 0750 soju soju - |