summaryrefslogtreecommitdiff
path: root/pcr/openrc-base/PKGBUILD
blob: ec0137aad8adb0af7798f93a3e1692ddaac4bdb9 (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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
# Maintainer (Manjaro): artoo <artoo@manjaro.org>
# Maintainer: Omar Vega Ramos <ovruni@gnu.org.pe>

_url="https://raw.githubusercontent.com/gentoo/gentoo/master"

pkgbase=openrc-base
pkgname=('cronie-openrc'
        'cryptsetup-openrc'
        'dhcpcd-openrc'
        'device-mapper-openrc'
        'glibc-openrc'
        'inetutils-openrc'
        'lvm2-openrc'
        'mdadm-openrc'
        'dbus-openrc')
pkgver=20170309
pkgrel=1.parabola1
pkgdesc="OpenRC init scripts"
arch=('any')
url="https://github.com/manjaro/packages-openrc"
license=('GPL2')
groups=('base-openrc' 'openrc-base')
conflicts=('systemd-sysvcompat')
source=("cronie.initd::${_url}/sys-process/cronie/files/cronie-1.3-initd"
		"dmcrypt.confd::${_url}/sys-fs/cryptsetup/files/1.6.7-dmcrypt.confd"
		"dmcrypt.initd::${_url}/sys-fs/cryptsetup/files/1.6.7-dmcrypt.rc"
		"nscd.initd::${_url}/sys-libs/glibc/files/nscd"
		"device-mapper.confd::${_url}/sys-fs/lvm2/files/device-mapper.conf-1.02.22-r3"
		"device-mapper.initd::${_url}/sys-fs/lvm2/files/device-mapper.rc-2.02.105-r2"
		"dmeventd.initd::${_url}/sys-fs/lvm2/files/dmeventd.initd-2.02.67-r1"
		"lvm.confd::${_url}/sys-fs/lvm2/files/lvm.confd-2.02.28-r2"
		"lvm.initd::${_url}/sys-fs/lvm2/files/lvm.rc-2.02.166-r2"
		"lvm-monitoring.initd::${_url}/sys-fs/lvm2/files/lvm-monitoring.initd-2.02.105-r2"
		"lvmetad.initd::${_url}/sys-fs/lvm2/files/lvmetad.initd-2.02.116-r3"
#		"lvmlockd.initd::${_url}/sys-fs/lvm2/files/lvmlockd.initd-2.02.166-r1"
		"mdadm.confd::${_url}/sys-fs/mdadm/files/mdadm.confd"
		"mdadm.initd::${_url}/sys-fs/mdadm/files/mdadm.rc"
		"mdraid.confd::${_url}/sys-fs/mdadm/files/mdraid.confd"
		"mdraid.initd::${_url}/sys-fs/mdadm/files/mdraid.rc"
		"dhcpcd.initd::${_url}/net-misc/dhcpcd/files/dhcpcd.initd"
		"dbus.initd::${_url}/sys-apps/dbus/files/dbus.initd-r1"
		'ftpd.confd'
		'ftpd.initd')
sha256sums=('8646ff964892eeb5f6c5da444a5ef5d898fb1f3a395c5b9fc85d32d8d56fc785'
            '3d933a54abe62a547294b83208dbf5d7615d9c7f380d6504c91fff3620530803'
            'd04627e1a64e4d86e957b20ff6f478fb376833b7602098a708af9c070e30a980'
            '13391343bfc64379c696b4bfc1cfe8d7fbb2886f477265343fddf448d82deabf'
            '57777904f12a35617e5a4193c964ebb32396452487fd02353e71e16e7b46bc22'
            'e8bfde63341f9e6136ee20a15ed9ea455e2259dbcaea756f8c3d0f710c1c2746'
            '5edaaad292d4fd6b67fd5323636dd2e839be33ae16fbc7872dadb0499fcf22da'
            '28370c089c39c248d7ded0960b8d8a9256bada44d44c22ce3cec87d512ef6844'
            '257e6801b1d2890fe77b7d030489066d9129712eae395b77ae5e9e461d435f80'
            '42847d8e6dabbcf2cc19846c6ad22cbab65e9a033c4add569b152504b16ab477'
            'e7f17004d505eae5d8a2fb336b22f1cdb20bb2ecf85a98daf2485bb4b0d4ff12'
            'ec55674955af7a31da51b8b72b599e8519809287dad796a9b16155bcba471b79'
            '5b859ba14b7a4a350c0a8afe6edb352e0db9920bdf1e05315ffbbfb92f201584'
            'b489ced10391d4295bb8ca29e128b0d4217c290f1b4e37b05f5a9275048d289d'
            '31e7ba4174f38c05e939aa56fab8a43a3e371ba9e503e029887c99fed7a28331'
            '6bb9b8b0075e45e63e898ed043f3c5951dc3e95c1fa62d22cc6e0616c792ecd1'
            '00a1a8f254d4f40b6f98a2777809b9c45ad81c4aeb4c0592793dd839777990bd'
            '59fe1aa68c43f4958afc397a0d6b35da263a20fcdb457005123a0d64cb1f7477'
            '7f46e5e9ac9f204fb1564560c506a5bb4cede8823b89e3f1844e4f8be258e9ef')

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

_inst_initd(){
	install -Dm755 ${srcdir}/$1.initd ${pkgdir}/etc/init.d/$1

	sed -e 's|#!/sbin/runscript|#!/usr/bin/openrc-run|' \
            -e 's|#!/sbin/openrc-run|#!/usr/bin/openrc-run|' \
            -e 's|/var/run|/run|g' \
            -i ${pkgdir}/etc/init.d/$1
}

_inst_confd(){
	install -Dm755 ${srcdir}/$1.confd ${pkgdir}/etc/conf.d/$1
}

package_cronie-openrc() {
	pkgdesc="OpenRC cronie init script"
	groups=('openrc-base' 'openrc-desktop')
	depends=('openrc' 'cronie')
	provides=('openrc-cron')
	conflicts=('fcron'
                    'fcron-openrc'
                    'systemd-sysvcompat')
	backup=('etc/init.d/cronie')

	_inst_initd 'cronie'

	sed -e 's|/usr/sbin|/usr/bin|g' -i ${pkgdir}/etc/init.d/cronie
}

package_dbus-openrc() {
    pkgdesc="OpenRC dbus init script"
    groups=('openrc-base' 'openrc-desktop')
    depends=('openrc' 'dbus-x11')

    _inst_initd 'dbus'

    sed -e 's|dbus.pid|dbus/pid|g' -i "${pkgdir}/etc/init.d/dbus"
}

package_dhcpcd-openrc() {
	pkgdesc="OpenRC dhcpcd init script"
	groups=('openrc-base' 'openrc-desktop')
	depends=('openrc' 'dhcpcd')

	_inst_initd 'dhcpcd'

	sed -e 's|/sbin|/usr/bin|g' -i "${pkgdir}/etc/init.d/dhcpcd"
}

package_device-mapper-openrc() {
	pkgdesc="OpenRC device-mapper init script"
	depends=('openrc' 'device-mapper' 'udev-openrc')
	backup=('etc/conf.d/device-mapper')

	_inst_confd 'device-mapper'
	_inst_initd 'device-mapper'
	_inst_initd 'dmeventd'

	for f in ${pkgdir}/etc/init.d/*; do
		sed -e 's|/sbin|/usr/bin|g' -i $f
	done
}

package_cryptsetup-openrc() {
	pkgdesc="OpenRC cryptsetup init script"
	depends=('device-mapper-openrc' 'cryptsetup')
	backup=('etc/conf.d/dmcrypt')

	_inst_confd 'dmcrypt'
	_inst_initd 'dmcrypt'

	sed -e 's|/usr/sbin|/usr/bin|g' -i "${pkgdir}/etc/init.d/dmcrypt"
}

package_glibc-openrc() {
	pkgdesc="OpenRC nscd init script"
	depends=('openrc' 'glibc')
	optdepends=('openldap-openrc'
			'bind-openrc')

	_inst_initd 'nscd'

	sed -e 's|/usr/sbin|/usr/bin|g' -i "${pkgdir}/etc/init.d/nscd"
}

package_inetutils-openrc() {
	pkgdesc="OpenRC ftpd init script"
	depends=('openrc' 'inetutils')
	backup=('etc/conf.d/ftpd')

	_inst_confd 'ftpd'
	_inst_initd 'ftpd'
}

package_lvm2-openrc() {
	pkgdesc="OpenRC lvm2 init script"
	depends=('device-mapper-openrc' 'lvm2')
	backup=('etc/conf.d/lvm')

	_inst_confd 'lvm'
	_inst_initd 'lvm'
	_inst_initd 'lvm-monitoring'
	_inst_initd 'lvmetad'

	for f in ${pkgdir}/etc/init.d/*; do
		sed -e 's|/sbin|/usr/bin|g' -i $f
	done
}

package_mdadm-openrc() {
	pkgdesc="OpenRC mdadm init script"
	depends=('openrc' 'mdadm')
	optdepends=('bind-openrc')
	backup=('etc/conf.d/mdadm')

        for f in mdadm mdraid;do
            _inst_confd $f
            _inst_initd $f
        done
}