diff options
author | David P <megver83@parabola.nu> | 2017-11-18 15:35:46 -0300 |
---|---|---|
committer | David P <megver83@parabola.nu> | 2017-11-18 15:35:54 -0300 |
commit | c799f6ae2ec796e75d399028736c9d70c021dcd7 (patch) | |
tree | 0d6d80b5b8bfada2b5a219e937ccd51df83b0469 /pcr/runit/PKGBUILD | |
parent | 537adb86225271d3e895cdb8e75b193196c0d6aa (diff) | |
download | abslibre-c799f6ae2ec796e75d399028736c9d70c021dcd7.tar.gz abslibre-c799f6ae2ec796e75d399028736c9d70c021dcd7.tar.bz2 abslibre-c799f6ae2ec796e75d399028736c9d70c021dcd7.zip |
Add runit & update openrc
openrc-init has been packaged separately from the openrc package
for OpenRC to gain compatibility with other init systems. As of now
there's runit and openrc-init which provide and conflict 'init',
meaning that those packages have a /sbin/init binary or symlink.
Packages which provide 'init' will also go to the 'init' group.
Note, however, that if attempting to install that package group
all the packages will conflict, so purpose of it is to simply do
'pacman -Sg init' to see a list of the available inits.
Diffstat (limited to 'pcr/runit/PKGBUILD')
-rw-r--r-- | pcr/runit/PKGBUILD | 66 |
1 files changed, 66 insertions, 0 deletions
diff --git a/pcr/runit/PKGBUILD b/pcr/runit/PKGBUILD new file mode 100644 index 000000000..2ca8c2910 --- /dev/null +++ b/pcr/runit/PKGBUILD @@ -0,0 +1,66 @@ +# Maintainer: David P. <megver83@parabola.nu> +# Maintainer (Artix): Chris Cromer <chris@cromer.cl> + +pkgbase=runit +pkgname=('runit' 'runit-doc') +pkgver=2.1.2 +pkgrel=1.parabola4 +arch=('armv7h' 'i686' 'x86_64') +url='http://smarden.org/runit/' +license=('BSD3') +source=("http://smarden.org/${pkgname}/${pkgbase}-${pkgver}.tar.gz") +sha512sums=('a18773ebf1aa22305dd89ed67363165b9fcf86c192b2be4e268d08005dd82d51265160c637abe072f2f2e378c4b315a75bd3d3e602c3e75bdd451a3b0190f8cf') + +prepare() { + # set default service path to /run/runit/service + cd "${srcdir}/admin/${pkgbase}-${pkgver}" + sed -i 's|"/service/"|"/run/runit/service/"|' src/sv.c +} + +build() { + cd "${srcdir}/admin/${pkgbase}-${pkgver}" + + CFLAGS="${CFLAGS} -static" + LDFLAGS="${LDFLAGS} -static" + + package/compile +} + +check() { + cd "${srcdir}/admin/${pkgbase}-${pkgver}" + package/check +} + +package_runit() { + pkgdesc='Cross-platform Unix init scheme with service supervision' + depends=('bash' 'runit-init' 'util-linux') + optdepends=('runit-doc: documentation') + provides=('init') + groups=('init') + conflicts=('systemd-sysvcompat' 'sysvinit' 'init') + # commands + mkdir -p "${pkgdir}/usr/bin" + install -Dm755 ${srcdir}/admin/${pkgbase}-${pkgver}/command/* "${pkgdir}/usr/bin" + + # man pages + mkdir -p "${pkgdir}/usr/share/man/man8" + install -Dm644 ${srcdir}/admin/${pkgbase}-${pkgver}/man/* "${pkgdir}/usr/share/man/man8" + + # default directories + mkdir -p "$pkgdir/etc/runit/runsvdir/default" + + # license + install -Dm644 "${srcdir}/admin/${pkgbase}-${pkgver}/package/COPYING" "$pkgdir/usr/share/licenses/runit/COPYING" + + # init + ln -sf runit-init "${pkgdir}/usr/bin/init" +} + +package_runit-doc() { + pkgdesc='Documentation for the runit init system' + groups=('init-doc') + arch=('any') + install -v -m755 -d "${pkgdir}/usr/share/doc" + cp -r "${srcdir}/admin/${pkgbase}-${pkgver}/doc" "${pkgdir}/usr/share/doc/${pkgbase}-${pkgver}" + rm "${pkgdir}/usr/share/doc/${pkgbase}-${pkgver}/debian" +} |