aboutsummaryrefslogtreecommitdiffstats
path: root/main/openrc/APKBUILD
blob: fbdf9de2e50cf2255bfe7a7e2a82dfa1a59bb833 (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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=openrc
pkgver=0.7.0_git20110222
_ver=${pkgver/_git*/}
pkgrel=1
pkgdesc="OpenRC manages the services, startup and shutdown of a host"
url="http://roy.marples.name/openrc"
arch="all"
license='BSD-2'
depends=""
subpackages="$pkgname-doc $pkgname-dev"
install="$pkgname.post-install $pkgname.post-upgrade"
source="http://distfiles.gentoo.org/distfiles/$pkgname-$_ver.tar.bz2
	openrc-0.7.0-git_20110222.patch
	0001-Use-rc_sys_v1-when-rc_sys-variable-is-defined-but-em.patch
	openrc-0.4.3-mkmntdirs.patch

	0001-Force-root-be-rw-before-localmount.patch
	0001-fsck-add-C0-and-T-options-unless-fsck-is-busybox.patch

	hostname.initd
	hwdrivers.initd
	keymaps.initd
	modules.initd
	modloop.initd
	networking.initd
	local.start
	modloop.confd
	"

_builddir="$srcdir/$pkgname-$_ver"
prepare() {
	cd "$_builddir"
	for i in $source; do
		case $i in
		*.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1
		esac
	done
	sed -i -e '/^sed/d' pkgconfig/Makefile
}

build() {
	cd "$_builddir"
	make || return 1
}

package() {
	cd "$_builddir"
	make DESTDIR="$pkgdir/" install

	# we cannot have anything turned on by default
	rm -f "$pkgdir"/etc/runlevels/*/*

	# we still use our ifup/ifdown based net config
	rm -f "$pkgdir"/etc/conf.d/network "$pkgdir"/etc/init.d/network

	# we override some of the scripts
	for i in ../*.initd; do
		j=${i##*/}
		install -Dm755 $i "$pkgdir"/etc/init.d/${j%.initd}
	done
	
	install -D -m644 "$srcdir"/modloop.confd "$pkgdir"/etc/conf.d/modloop
	install -Dm644 ../local.start "$pkgdir"/etc/conf.d/local.start
}

md5sums="80efd9dd83d4713ddfb7e41a6433cc9c  openrc-0.7.0.tar.bz2
85b667dcadf8aab78384bc942babc89a  openrc-0.7.0-git_20110222.patch
c3dfd1a0ee9e88a0d491d815ca634bda  0001-Use-rc_sys_v1-when-rc_sys-variable-is-defined-but-em.patch
8c2c1c2ee0509b63966b7187a2079f4b  openrc-0.4.3-mkmntdirs.patch
4fd036ff07ed9ad7fb76af6a3ffc0695  0001-Force-root-be-rw-before-localmount.patch
fb8baeaf32f4d53491312675f28a9939  0001-fsck-add-C0-and-T-options-unless-fsck-is-busybox.patch
c32e15b0858eef708497e7ee6355a055  hostname.initd
b1e64885f301166df30be3e3cf5338ff  hwdrivers.initd
33ca3e558c42cdd17adccbc7807298f7  keymaps.initd
098a1f16812f56fcb56eb6b6f0fa31f6  modules.initd
408e28f247c7cc71fa104c07869417f4  modloop.initd
af16db0d798392c7c0ed3434e4bad241  networking.initd
0a615d93aab691364c03539c3b496dcc  local.start
c1ec888202d868710b5749f7b217d1e3  modloop.confd"