You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

43 lines
1.2 KiB

# Maintainer: Muhammad Herdiansyah <koni@artixlinux.org>
_sed_args=(-e 's|/var/run|/run|g' -e 's|/usr/sbin|/usr/bin|g' -e 's|/opt/bin|/usr/bin|g' -e 's|/var/service|/run/runit/service|g' -e 's|/usr/libexec|/usr/lib|g')
pkgname=znc-runit
pkgver=20200614
pkgrel=2
pkgdesc="Runit service script for znc"
arch=('any')
url="https://artixlinux.org"
license=('BSD')
depends=('znc' 'runit')
groups=('runit-galaxy')
conflicts=('init-znc')
provides=('init-znc')
source=("znc.run")
sha256sums=('ad40a43e00c9a1c2892d8d3394ae4b8dde078f20e1cd10e7dbd38ecaea1ef9dc')
_inst_logsv() {
for file in run finish check; do
if test -f "$srcdir/log$1.$file"; then
install -Dm755 "$srcdir/log$1.$file" "$pkgdir/etc/runit/sv/$1/log/$file"
sed "${_sed_args[@]}" -i "$pkgdir/etc/runit/sv/$1/log/$file"
fi
done
}
_inst_sv() {
if test -f "$srcdir/$1.conf"; then
install -Dm644 "$srcdir/$1.conf" "$pkgdir/etc/runit/sv/$1/conf"
fi
for file in run finish check; do
if test -f "$srcdir/$1.$file"; then
install -Dm755 "$srcdir/$1.$file" "$pkgdir/etc/runit/sv/$1/$file"
sed "${_sed_args[@]}" -i "$pkgdir/etc/runit/sv/$1/$file"
fi
done
}
package() {
_inst_sv 'znc'
}