-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathPKGBUILD
122 lines (106 loc) · 3.42 KB
/
PKGBUILD
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
#!/bin/bash
# shellcheck disable=SC2034,SC2154,SC2068
pkgname=(s6 s6-dev)
pkgver=2.11.1.2
pkgrel=1
pkgdesc='A small process supervision suite for UNIX.'
arch=(x86_64)
url='http://skarnet.org/software/s6/'
license=(ISC)
groups=()
depends=()
makedepends=(skalibs-dev execline-dev)
options=(emptydirs)
changelog=ChangeLog
source=(
"http://skarnet.org/software/s6/s6-${pkgver}.tar.gz"
rc.init
rc.shutdown
s6.install
s6-init
s6-svscan-crash
s6-svscan-finish
s6-svscan-log
s6-service
s6-telinit
taillog
tty1-service
ttyS0-service
)
sha256sums=(
6c1474be3e889dac392cee307abe015cd4be0c85c725c84ea7f184f0e34503a2
719101b2a26b1e85dd40f5e69fad66ad866ce1ac79764ada4b3ef0b5c62cfc89
db0e8c503e72eb05356a4ec9a65903a6d6447b5786453d0d8dbf097534c89ad5
6ba76e90d72d7e59763a0ec42304d46abfd17548b1d52485dcf2e5306998887e
ad6fc42721170dbceefaa55a3e3010d023420de5a1882735a1eab32ac9ec92d4
a90dd71977a0a223265ddda7713e8cd798d14d21a3b010c9ba69b8c76c483133
aa07d12477029cabc69f6024dc2ca1f3ea2137df869b1e72a1a47491abc980df
551527219c85ec06df46c8f54e7c13afc181276ace95135491795457a7eec501
1f6282b4bb277bf6f6924c8b82c46f0012e665c401732720983c2e43ba504f36
9cb05e7d9637f5175ab270c45acf15ff25e68b93dd6d300a1fb226182a12fc3f
6fe869bfaf65ea4528bcb437c8c2d818aae898ea3be9215ae082ce3548e34d08
538bc61ea2ef419c1e48e683d7b6a52ea45ea5b06ad765bbfa28b79d3953829f
80efd99ed9a4c12345c15cd1eafaa32467cea341eac88d9282275c73326831fe
)
install=s6.install
build() {
cd_unpacked_src
./configure \
--prefix=/ \
--bindir=/sbin \
--libexecdir=/lib/s6 \
--enable-static-libc
make
}
package_s6() {
options+=(emptydirs)
pkgfiles=(
bin
etc
s6
sbin
lib/s6
)
depends=(execline)
groups=(base)
# Run make install
cd_unpacked_src
make DESTDIR="${pkgdirbase}/dest" install
# Begin customization
cd "${pkgdirbase}/dest" || return 1
mv lib/s6/libs6.a lib/
# Services dir and init
install -d s6 etc/s6/services/{available,enabled}
install -m 0750 "${srcdir}/s6-init" sbin/
install -m 0750 "${srcdir}/rc.init" etc/s6/
install -m 0750 "${srcdir}/rc.shutdown" etc/s6/
install -m 0750 "${srcdir}/s6-telinit" sbin/
# Early env vars
install -d etc/s6/env
echo 'UTC' >etc/s6/env/TZ
# crash and finish scripts for s6-svscan
install -d etc/s6/init-services/.s6-svscan
install -m 0750 "${srcdir}/s6-svscan-crash" etc/s6/init-services/.s6-svscan/crash
install -m 0750 "${srcdir}/s6-svscan-finish" etc/s6/init-services/.s6-svscan/finish
# early tty1 and ttyS0 service
install -d etc/s6/init-services/tty1 etc/s6/init-services/ttyS0
install -m 0754 "${srcdir}/tty1-service" etc/s6/init-services/tty1/run
install -m 0754 "${srcdir}/ttyS0-service" etc/s6/init-services/ttyS0/run
# Script and named pipe for catchall logging process
install -d etc/s6/init-services/s6-svscan-log
install -m 0750 "${srcdir}/s6-svscan-log" etc/s6/init-services/s6-svscan-log/run
mkfifo etc/s6/init-services/s6-svscan-log/fifo
chmod 0600 etc/s6/init-services/s6-svscan-log/fifo
# Human readable/usable service compatibility layer
install -m 0754 "${srcdir}/s6-service" sbin/
install -d bin
install -m 0755 "${srcdir}/taillog" bin/
package_defined_files
}
package_s6-dev() {
pkgfiles=(
include
lib/libs6.a
)
std_split_package
}