~xenrox/personal-packages

77d3dd21daf83362d63bfdcb1d2c19ec93e91b89 — Thorben Günther 2 years ago 4075f2c
Add soju-srht
A soju-srht/.SRCINFO => soju-srht/.SRCINFO +25 -0
@@ 0,0 1,25 @@
pkgbase = soju
	pkgdesc = A user-friendly IRC bouncer
	pkgver = 0.2.2
	pkgrel = 1
	url = https://soju.im/
	install = soju.install
	arch = x86_64
	license = AGPL3
	makedepends = go
	makedepends = scdoc
	depends = sqlite
	backup = etc/soju/config
	source = https://git.sr.ht/~emersion/soju/refs/download/v0.2.2/soju-0.2.2.tar.gz
	source = https://git.sr.ht/~emersion/soju/refs/download/v0.2.2/soju-0.2.2.tar.gz.sig
	source = soju.sysusers
	source = soju.service
	source = soju.tmpfiles
	validpgpkeys = 34FF9526CFEF0E97A340E2E40FDE7BE0E88F5E48
	sha256sums = d55c5c6e7dac5855280e6d19ed54e65445f847ed9a620b0aee58d0e398c3107a
	sha256sums = SKIP
	sha256sums = c050d3f376f43e1cc22e75f445027862df8d09230e18cbb0913ab58ddced78aa
	sha256sums = d90c047f5f27a06d45840698a0caa9940fc02c75187c04348882f20359655c2b
	sha256sums = 7d9e772f42765a82be0459bcbded2074f68d450ab09c3627ca3b59978188b61b

pkgname = soju

A soju-srht/PKGBUILD => soju-srht/PKGBUILD +50 -0
@@ 0,0 1,50 @@
# Maintainer: Thorben Günther <echo YWRtaW5AeGVucm94Lm5ldAo= | base64 -d>

pkgname=soju-srht
_pkgname=soju
pkgver=0.2.2
pkgrel=3
pkgdesc='A user-friendly IRC bouncer (with srht support)'
arch=('x86_64')
url='https://soju.im/'
license=('AGPL3')
depends=('sqlite')
makedepends=('go' 'scdoc')
install=$_pkgname.install
provides=('soju')
conflicts=('soju')
githash="20525785cd2c45d0925bc0d9fdd62507d3400fef"
source=(
    "$pkgname-$pkgver.tar.gz::https://git.sr.ht/~emersion/soju/archive/$githash.tar.gz"
    "soju.sysusers"
    "soju.service"
    "soju.tmpfiles"
)
sha256sums=('dc25ba4fcfe979d53a33411f6d94dc296a98616417999561ccc74e26f970f3de'
            'c050d3f376f43e1cc22e75f445027862df8d09230e18cbb0913ab58ddced78aa'
            '4ad13c2c1246381743ede31801c7867009d7c242325dbdb2fe97def5dc46b185'
            '7d9e772f42765a82be0459bcbded2074f68d450ab09c3627ca3b59978188b61b')
backup=('etc/soju/config')
validpgpkeys=('34FF9526CFEF0E97A340E2E40FDE7BE0E88F5E48')

build() {
    cd "$srcdir/$_pkgname-$githash"
    export CGO_LDFLAGS="${LDFLAGS}"
    export CGO_CFLAGS="${CFLAGS}"
    export CGO_CPPFLAGS="${CPPFLAGS}"
    export CGO_CXXFLAGS="${CXXFLAGS}"
    export GOFLAGS="-buildmode=pie -trimpath -ldflags=-linkmode=external -mod=readonly -modcacherw"

    go build ./cmd/soju
    go build ./cmd/sojuctl

    scdoc <doc/soju.1.scd >doc/soju.1
}

package() {
    cd "$srcdir/$_pkgname-$githash"
    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"
}

A soju-srht/soju.install => soju-srht/soju.install +5 -0
@@ 0,0 1,5 @@
#/bin/bash

post_install() {
    echo '==> Modify /etc/soju/config (man soju)'
}

A soju-srht/soju.service => soju-srht/soju.service +13 -0
@@ 0,0 1,13 @@
[Unit]
Description=soju IRC bouncer service
After=network.target

[Service]
Type=simple
User=soju
Restart=always
ExecStart=/usr/bin/soju --config /etc/soju/config
Environment=SRHT_ENDPOINT=https://meta.xenrox.net

[Install]
WantedBy=multi-user.target

A soju-srht/soju.sysusers => soju-srht/soju.sysusers +1 -0
@@ 0,0 1,1 @@
u soju - "soju user" /var/lib/soju

A soju-srht/soju.tmpfiles => soju-srht/soju.tmpfiles +2 -0
@@ 0,0 1,2 @@
d /var/lib/soju 0750 soju soju -
d /var/lib/soju/logs 0750 soju soju -