summaryrefslogtreecommitdiff
path: root/pcr/runit/PKGBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'pcr/runit/PKGBUILD')
-rw-r--r--pcr/runit/PKGBUILD66
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"
+}