summaryrefslogtreecommitdiff
path: root/pcr/runit-scripts/PKGBUILD
blob: b072bb03c0ab9b6daa44d5fc2039905c81fb644c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
# Maintainer: David P. <megver83@parabola.nu>
# Maintainer (Artix): Chris Cromer <chris@cromer.cl>

_commit=b000d389f91ec182db721a3be428de04e05b9efd

pkgname=runit-scripts
pkgver=20171120
pkgrel=1
pkgdesc='Runit initscripts for GNU/Linux'
provides=('runit-init')
conflicts=('runit-init')
url='https://gitlab.com/Megver83/runit-scripts'
license=('GPL3')
arch=('armv7h' 'i686' 'x86_64')
depends=('procps-ng' 'awk' 'sh' 'eudev' 'runit')
optdepends=('openrc: for managing services with OpenRC')
source=("${pkgname}-${pkgver}.tar.gz::https://gitlab.com/Megver83/runit-scripts/repository/${_commit}/archive.tar.gz")
backup=('etc/runit/rc.conf'
        'etc/runit/rc.local'
        'etc/runit/rc.shutdown')
sha512sums=('5747c1a091e51a8634b67ddfacf4ebc6f5221904fa86986934153728f4cbece372918d0940fcd3e1e9bc307a5e88f0b948520ea998306b8934f17634ea9779ba')

pkgver() {
    date +%Y%m%d
}            

build() {
	cd ${srcdir}
	mv ${pkgname}-${_commit}-${_commit} ${pkgname}-${pkgver}
	cd ${pkgname}-${pkgver}
	make
}

package() {
	cd "${srcdir}/${pkgname}-${pkgver}"
    
    sed 's|/sbin|/bin|' -i Makefile
	make DESTDIR="${pkgdir}" PREFIX="/usr" install

	# License
	mkdir -p "${pkgdir}"/usr/share/licenses/runit-scripts
	cp {COPYING,LICENSE} "${pkgdir}"/usr/share/licenses/runit-scripts/
}