diff options
Diffstat (limited to 'pcr/runit-scripts')
-rw-r--r-- | pcr/runit-scripts/PKGBUILD | 37 | ||||
-rw-r--r-- | pcr/runit-scripts/runit.install | 7 |
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 +} |