blob: fc1330cf5f2783fa13d0a37ad8284ec7d41a1ebc (
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
|
# Maintainer: Igor Saric <karabaja4 at gmail.com>
# shellcheck disable=SC2181,SC2148,SC2034,SC2164,SC2154
_gitname=minirc-ng
_version=1.2
pkgname=${_gitname}-git
pkgver=${_version}.920ad1b
pkgrel=1
pkgdesc="Minimalistic init script (ng)"
arch=('any')
url="https://github.com/karabaja4/${_gitname}"
license=('GPL2')
depends=('busybox' 'bash' 'jq' 'util-linux')
makedepends=('git')
optdepends=('systemd: udev implementation')
conflicts=('systemd-sysvcompat' 'sysvinit')
backup=('etc/minirc.json' 'etc/minirc.local' 'etc/minirc.local.shutdown')
source=("git+${url}.git")
md5sums=('SKIP')
prepare() {
cd "${_gitname}"
sed -i "10s/${_gitname}/${_gitname} ${_version}.$(git rev-parse --short HEAD)/g" "src/rc"
}
pkgver() {
cd "${_gitname}"
echo "${_version}.$(git rev-parse --short HEAD)"
}
package() {
cd "${_gitname}"
install -Dm755 "src/rc" "${pkgdir}/usr/bin/rc"
install -Dm755 "src/minirc.local" "${pkgdir}/etc/minirc.local"
install -Dm755 "src/minirc.local.shutdown" "${pkgdir}/etc/minirc.local.shutdown"
install -Dm644 "src/minirc.json" "${pkgdir}/etc/minirc.json"
install -Dm644 "src/inittab" "${pkgdir}/etc/inittab"
for i in init halt poweroff reboot
do
ln -sf "/usr/bin/busybox" "${pkgdir}/usr/bin/${i}"
done
}
|