summaryrefslogtreecommitdiff
path: root/pcr/runit-scripts/PKGBUILD
blob: acaddd5fff02d3315940a13f6ec2a21e5857cc7b (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=0800961464d5afeb69730e4c9adc6733d26ea031

pkgname=runit-scripts
pkgver=20171118
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=('46439bfc5293fa1c3cddfff748a65a09c03da5d27dc6288a8904a50fc618934a3bcfab7c32a3dc8fba3e095146855584389ea7731f45947cef6d0d0dd1636921')

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/
}