summaryrefslogtreecommitdiff
path: root/pcr/runit-scripts
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@lukeshu.com>2018-07-30 11:41:38 -0400
committerLuke Shumaker <lukeshu@lukeshu.com>2018-07-30 17:18:33 -0400
commita7cc30a62955e44e02091ad8f7c1ab5d5544d3c4 (patch)
tree03f152dea0494f20d0b2168a32f691a7b4d8a65b /pcr/runit-scripts
parent513cfb305809ca420d67fcafcaf2dd5b26d6fa7d (diff)
pcr/runit-scripts: Adjust to work with new runit
- provides/conflicts=('init'), not 'runit-init' - don't provide /etc/runit/runsvdir/current as a package file - do provide the /usr/bin/init->runit-init symlink While we're at it: - depend on generic 'udev' instead of 'eudev' - Use git sources to have a sane pkgver() function - move a sed command to prepare() - provides/conflicts=('openrc-pid1'), since it launches openrc if it's installed
Diffstat (limited to 'pcr/runit-scripts')
-rw-r--r--pcr/runit-scripts/PKGBUILD37
-rw-r--r--pcr/runit-scripts/runit.install7
2 files changed, 30 insertions, 14 deletions
diff --git a/pcr/runit-scripts/PKGBUILD b/pcr/runit-scripts/PKGBUILD
index b072bb03c..94c00d94a 100644
--- a/pcr/runit-scripts/PKGBUILD
+++ b/pcr/runit-scripts/PKGBUILD
@@ -5,38 +5,47 @@ _commit=b000d389f91ec182db721a3be428de04e05b9efd
pkgname=runit-scripts
pkgver=20171120
-pkgrel=1
+pkgrel=2
pkgdesc='Runit initscripts for GNU/Linux'
-provides=('runit-init')
-conflicts=('runit-init')
+provides=('init' 'openrc-pid1')
+conflicts=('init' 'openrc-pid1')
url='https://gitlab.com/Megver83/runit-scripts'
license=('GPL3')
arch=('armv7h' 'i686' 'x86_64')
-depends=('procps-ng' 'awk' 'sh' 'eudev' 'runit')
+depends=('procps-ng' 'awk' 'sh' 'udev' 'runit')
optdepends=('openrc: for managing services with OpenRC')
-source=("${pkgname}-${pkgver}.tar.gz::https://gitlab.com/Megver83/runit-scripts/repository/${_commit}/archive.tar.gz")
+makedepends=('git')
+source=("git+https://gitlab.com/Megver83/$pkgname.git#commit=${_commit}")
backup=('etc/runit/rc.conf'
'etc/runit/rc.local'
'etc/runit/rc.shutdown')
-sha512sums=('5747c1a091e51a8634b67ddfacf4ebc6f5221904fa86986934153728f4cbece372918d0940fcd3e1e9bc307a5e88f0b948520ea998306b8934f17634ea9779ba')
+sha512sums=('SKIP')
+install=runit.install
pkgver() {
- date +%Y%m%d
-}
+ cd "$srcdir/$pkgname"
+ git log -n1 --format='%cd' --date=format:'%Y%m%d'
+}
+
+prepare() {
+ cd "$srcdir/$pkgname"
+ sed 's|/sbin|/bin|' -i Makefile
+}
build() {
- cd ${srcdir}
- mv ${pkgname}-${_commit}-${_commit} ${pkgname}-${pkgver}
- cd ${pkgname}-${pkgver}
+ cd "$srcdir/$pkgname"
make
}
package() {
- cd "${srcdir}/${pkgname}-${pkgver}"
-
- sed 's|/sbin|/bin|' -i Makefile
+ cd "$srcdir/$pkgname"
+
make DESTDIR="${pkgdir}" PREFIX="/usr" install
+ rm -f "${pkgdir}"/etc/runit/runsvdir/current
+ install -d "${pkgdir}"/usr/bin
+ ln -sT runit-init "${pkgdir}"/usr/bin/init
+
# License
mkdir -p "${pkgdir}"/usr/share/licenses/runit-scripts
cp {COPYING,LICENSE} "${pkgdir}"/usr/share/licenses/runit-scripts/
diff --git a/pcr/runit-scripts/runit.install b/pcr/runit-scripts/runit.install
new file mode 100644
index 000000000..609fd90ae
--- /dev/null
+++ b/pcr/runit-scripts/runit.install
@@ -0,0 +1,7 @@
+#!/hint/bash
+
+post_install() {
+ if ! test -L etc/runit/runsvdir/current; then
+ ln -sfvT default etc/runit/runsvdir/current
+ fi
+}