summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorPlaton Ryzhikov2018-12-26 21:57:10 +0300
committerPlaton Ryzhikov2018-12-26 21:57:10 +0300
commiteb24d281373d038eb4f77b4756cc154fd006f384 (patch)
tree8ad4918afc66cce379f555026335c3909fa3696a
downloadaur-eb24d281373d038eb4f77b4756cc154fd006f384.tar.gz
Initial commit
-rw-r--r--.SRCINFO17
-rw-r--r--PKGBUILD35
-rw-r--r--nldev.conf3
-rw-r--r--nldev.run4
-rw-r--r--nltrigger.run4
5 files changed, 63 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..d7e6299515d
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,17 @@
+pkgbase = nldev-runit
+ pkgdesc = runit service scripts for nldev
+ pkgver = 20181226
+ pkgrel = 1
+ arch = any
+ license = MIT/X
+ depends = nldev
+ depends = runit
+ source = nldev.run
+ source = nldev.conf
+ source = nltrigger.run
+ sha256sums = cec0065df70a4f1416cfb2e55d62ce006244ff99e102b4928cf8637c9ab38f7f
+ sha256sums = 970bc31081ea9a46f6b03d5f593a18920b830da5d7dc8e625566dffbb05362e2
+ sha256sums = 08e171df7501cbd7dbd5ef820bed5f4e572fb28cc64daa05bc83144d77aa1a5e
+
+pkgname = nldev-runit
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..c8cbc1d0c93
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,35 @@
+# Maintainer: Platon Ryzhikov <ihummer63@yandex.ru>
+
+_sed_args=(-e 's|/var/service|/run/runit/service|g' -e 's|/var/run|/run|g' -e 's|/usr/sbin|/usr/bin|g' -e 's|/opt/bin|/usr/bin|g' -e 's|/usr/libexec|/usr/lib|g')
+
+pkgname=nldev-runit
+pkgver=20181226
+pkgrel=1
+pkgdesc="runit service scripts for nldev"
+arch=('any')
+license=('MIT/X')
+depends=('nldev' 'runit')
+source=("nldev.run"
+ "nldev.conf"
+ "nltrigger.run")
+sha256sums=('cec0065df70a4f1416cfb2e55d62ce006244ff99e102b4928cf8637c9ab38f7f'
+ '970bc31081ea9a46f6b03d5f593a18920b830da5d7dc8e625566dffbb05362e2'
+ '08e171df7501cbd7dbd5ef820bed5f4e572fb28cc64daa05bc83144d77aa1a5e')
+
+_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 'nldev'
+ _inst_sv 'nltrigger'
+}
diff --git a/nldev.conf b/nldev.conf
new file mode 100644
index 00000000000..54c5f5f2b55
--- /dev/null
+++ b/nldev.conf
@@ -0,0 +1,3 @@
+runpath=/usr/bin/smdev
+# uncomment to log nldev output
+#optargs="-d"
diff --git a/nldev.run b/nldev.run
new file mode 100644
index 00000000000..7688b521d7a
--- /dev/null
+++ b/nldev.run
@@ -0,0 +1,4 @@
+#!/bin/sh
+[ -r conf ] && . ./conf
+runpath=${runpath:-/usr/bin/smdev}
+exec nldev -r $runpath $optargs 2>&1
diff --git a/nltrigger.run b/nltrigger.run
new file mode 100644
index 00000000000..f844daa5d2c
--- /dev/null
+++ b/nltrigger.run
@@ -0,0 +1,4 @@
+#!/bin/sh
+sv check nldev >/dev/null || exit 1
+nltrigger add all
+exec pause