1 # Maintainer: taca <taca@kadisius.eu>
11 'nosh-service-management'
12 'nosh-terminal-management'
13 'nosh-run-system-manager'
14 'nosh-ucspi-tcp-shims'
15 'nosh-terminal-extras'
24 'nosh-run-via-systemd'
27 'nosh-run-systemd-udev'
28 'nosh-run-busybox-mdev'
29 'nosh-run-suckless-mdev'
32 'nosh-run-freedesktop-system-bus'
33 'nosh-run-freedesktop-kits'
34 'nosh-run-virtualbox-guest'
36 'nosh-run-local-syslog'
37 'nosh-run-debian-server-base'
38 'nosh-run-debian-desktop-base'
39 'nosh-run-openssh-server'
43 pkgdesc="A suite of system-level utilities for initializing and running a BSD or Linux system, for managing daemons, for managing terminals, and for managing logging."
45 url="https://jdebp.eu/Softwares/nosh/index.html"
46 license=('custom:MIT Expat' 'custom:FreeBSD' 'custom:ISC' 'custom:Simplified BSD')
49 makedepends=('pax' 'docbook-xml' 'docbook-xsl' 'xmlto' 'libtinfo' 'redo-jdebp')
58 changelog="archnosh.changelog"
60 # packages with maintenance scripts
65 "nosh-run-local-syslog"
66 "nosh-run-via-systemd"
67 "nosh-run-busybox-mdev"
68 "nosh-run-openssh-server"
69 "nosh-run-via-systemd"
70 "nosh-run-freedesktop-kits"
71 "nosh-run-suckless-mdev"
72 "nosh-run-freedesktop-system-bus"
73 "nosh-run-system-manager"
74 "nosh-run-virtualbox-guest"
77 "nosh-run-systemd-udev"
78 "nosh-run-debian-server-base"
79 "nosh-run-debian-desktop-base"
80 "nosh-run-openssh-server"
83 # no point in distributing empty files, create them now, they are filled in later
84 for i in ${_pkginstalls[@]}
89 source=("https://jdebp.eu/Repository/freebsd/nosh-$pkgver.tar.gz"
91 "maintenance-scripts.patch"
96 "nosh-bundles.install"
97 "nosh-run-klog.install"
98 "nosh-run-user-vt.install"
99 "nosh-run-local-syslog.install"
100 "nosh-run-via-systemd.install"
101 "nosh-run-busybox-mdev.install"
102 "nosh-run-openssh-server.install"
103 "nosh-run-via-systemd.install"
104 "nosh-run-freedesktop-kits.install"
105 "nosh-run-suckless-mdev.install"
106 "nosh-run-freedesktop-system-bus.install"
107 "nosh-run-system-manager.install"
108 "nosh-run-virtualbox-guest.install"
109 "nosh-run-kernel-vt.install"
110 "nosh-run-udev.install"
111 "nosh-run-systemd-udev.install"
112 "nosh-run-debian-server-base.install"
113 "nosh-run-debian-desktop-base.install"
114 "nosh-run-openssh-server.install"
118 'df1f320d353459580ae20d1d62115de375398916a1fe3a7746a6fc89acfb7c75' # nosh-1.35.tar.gz
119 'ceab03a0b164c16b1189e46e1db45e71e83c5612ea01c639d750437cbeb6ff58' # staging.patch
120 'e5e90eea4ed0685eccbb6f5435c55100b4ffa53062068d202b0cb96c521c221a' # maintenance-scripts.patch
121 '766ae08d97b2d840761132d164bd6bc596c4157470e9ce8b8a6135ea95624ed4' # maintenance.sh
122 '2f3a9ee93505534f2db82d71edb694b1c32aa3f4e2880f3d62589a5fe65f062b' # scriptletbuilder.sh
123 'b7bf62d27ffcf7e300616b0b3a56667ffd910c9a2a36914d3a05c44c398f8d7a' # services-dbus.patch
149 # ncurses headers different to Debian layout, patch out the ncursesw directory in cpp Includes
150 # taken from https://github.com/atweiden/pkgbuilds/blob/master/nosh/PKGBUILD
151 msg2 "Fix ncurses header import issues"
152 cd "${srcdir}"/source
153 find . -type f -print0 | xargs -0 sed -i 's@ncursesw/curses\.h@curses.h@g'
155 # patch package/stage for Archlinux filesystem layout
156 msg2 "Align staging with Arch FS hierarchy guidelines"
158 patch -p1 -i "${srcdir}"/staging.patch
160 # patch debian maintenance scripts
161 msg2 "Adapting maintenance scripts"
162 cd "${srcdir}"/package/debian
163 sed -i 's@usr/local/lib@usr/lib@g' nosh-run-via-systemd.postinst.extra
165 patch -p1 -i "${srcdir}"/maintenance-scripts.patch
167 # rename debian maintenance scripts to Archlinux nomenclature
168 msg2 "Renaming maintenance scripts"
169 cd "${srcdir}"/package/debian
170 source "${srcdir}"/maintenance.sh
172 msg2 "Modifying service files"
174 patch -p1 -i "${srcdir}"/services-dbus.patch
179 msg2 "Building main source"
180 "${srcdir}"/package/compile
182 msg2 "Generating .install files"
183 source "${srcdir}"/scriptletbuilder.sh
184 for i in ${_pkginstalls[@]}
186 echo "Bulding $i.install"
187 _buildinstall $i > $i.install
190 msg2 "Staging packages"
191 # stage packages to 'staging' directory
192 "${srcdir}"/package/stage "${srcdir}" "${srcdir}"/staging
196 # no test available for the moment
197 msg "Checking skipped..."
200 package_nosh-common() {
202 # provide license (can't be done in each package, it creates file conflicts on install)
203 install -Dm 644 "${srcdir}"/source/COPYING "${pkgdir}"/usr/share/licenses/nosh/COPYING
207 # refactor the packaging, need special case for non-conforming package
208 for _pkg in ${pkgname[@]}
210 if test "$_pkg" != "nosh-common"
212 eval "package_${_pkg}() { _package $_pkg; }"
220 pkgdesc="Z Shell completion functions for the nosh toolset"
221 depends+=( 'nosh-common')
222 optdepends=( 'zsh: for actual ZSH support' )
225 pkgdesc="User guide for the various nosh-* packages"
226 depends+=( 'nosh-common')
229 pkgdesc="Minimal non-shell script processor and various chain-load utilities useful for services"
230 depends+=( 'nosh-common')
231 conflicts+=( 'daemontools' 'daemontools-encore' )
234 pkgdesc="Execline utility shims"
235 depends+=( 'nosh-common' 'nosh-exec')
236 conflicts+=( 'execline' )
239 pkgdesc="Core utility shims"
240 depends+=( 'nosh-common' 'nosh-exec')
241 conflicts+=( 'coreutils' 'util-linux' )
243 nosh-service-management)
244 pkgdesc="Service and system management utilities"
245 depends+=( 'nosh-common')
246 conflicts+=( 'nosh-bundles<=1.30' 'daemontools' 'daemontools-encore' )
248 nosh-terminal-management)
249 pkgdesc="Virtual terminal, pseudo-terminal, and TUI login tools"
250 depends+=( 'nosh-common' 'nosh-service-management>=1.14' )
251 conflicts+=( 'nosh-bundles<=1.20')
253 nosh-run-system-manager)
254 pkgdesc="Run the nosh system manager"
255 depends+=( 'nosh-common' 'nosh-service-management>=1.33' 'nosh-exec' 'nosh-bundles' 'redo-jdebp')
256 conflicts+=( 'nosh-run-via-systemd' 'upstart' 'sysvinit' 'systemd-sysvcompat') #'systemd'
257 install="nosh-run-system-manager.install"
259 nosh-ucspi-tcp-shims)
260 pkgdesc="Bernstein UCSPI-TCP shim service utilities"
261 depends+=( 'nosh-common' 'nosh-exec' )
262 conflicts+=( 'ucspi-tcp' 'nosh-exec<=1.32')
264 nosh-terminal-extras)
265 pkgdesc="Extra terminal utilities"
266 depends+=( 'nosh-common' 'nosh-terminal-management' )
269 pkgdesc="Systemd shim service and system management utilities"
270 depends+=( 'nosh-common' 'nosh-service-management' )
271 conflicts+=( 'systemd' )
274 pkgdesc="BSD and System 5 shim service and system management utilities"
275 depends+=( 'nosh-common' 'nosh-service-management' )
276 conflicts+=( 'systemd-sysvcompat')
279 pkgdesc="Upstart shim service and system management utilities"
280 depends+=( 'nosh-common' 'nosh-service-management' )
283 pkgdesc="Debian shim service and system management utilities"
284 depends+=( 'nosh-common' 'nosh-service-management' )
285 conflicts+=( 'nosh-run-via-systemd' 'upstart' 'sysvinit' 'systemd' )
288 pkgdesc="OpenBSD shim service and system management utilities"
289 depends+=( 'nosh-common' 'nosh-service-management' 'nosh-systemv-shims<=1.28' )
290 conflicts+=( 'nosh-systemv-shims<=1.27')
293 pkgdesc="BSD shim service and system management utilities"
294 depends+=( 'nosh-common' 'nosh-service-management' )
295 conflicts+=( 'android-tools' )
298 pkgdesc="shim kbd utilities"
299 depends+=( 'nosh-common' 'nosh-terminal-management' )
303 pkgdesc="Service bundles"
304 depends+=( 'nosh-common' 'nosh-service-management>=1.33' 'nosh-exec>=1.32' 'nosh-terminal-management>=1.22' 'shadow' )
305 install="nosh-bundles.install"
307 nosh-run-via-systemd)
308 pkgdesc="Run the nosh service manager and daemontools service scanner via systemd"
309 depends+=( 'nosh-common' 'nosh-service-management>=1.33' 'systemd' 'nosh-bundles' )
310 install="nosh-run-via-systemd.install"
313 pkgdesc="Run old-style kernel virtual terminals"
314 depends+=( 'nosh-common' 'nosh-exec' 'nosh-service-management>=1.33' 'nosh-terminal-management' 'nosh-bundles' )
315 install="nosh-run-kernel-vt.install"
318 pkgdesc="Run udev as the device manager"
319 depends+=( 'nosh-common' 'nosh-exec' 'nosh-service-management>=1.33' 'nosh-bundles' )
320 optdepends+=( 'eudev: alternative udev implementation' )
321 conflicts+=('nosh-run-busybox-mdev' 'nosh-run-suckless-mdev' 'nosh-run-vdev' 'nosh-run-systemd-udev')
322 install="nosh-run-udev.install"
324 nosh-run-systemd-udev)
325 pkgdesc="Run systemd-udev as the device manager"
326 depends+=( 'nosh-common' 'nosh-exec' 'nosh-service-management>=1.33' 'nosh-bundles>=1.34' 'systemd')
327 conflicts+=('nosh-run-busybox-mdev' 'nosh-run-suckless-mdev' 'nosh-run-vdev' 'nosh-run-udev')
328 install="nosh-run-systemd-udev.install"
330 nosh-run-busybox-mdev)
331 pkgdesc="Run BusyBox mdev as the device manager"
332 depends+=( 'nosh-common' 'nosh-exec' 'nosh-service-management>=1.33' 'nosh-bundles' 'busybox')
333 conflicts+=('nosh-run-udev' 'nosh-run-suckless-mdev' 'nosh-run-vdev' 'nosh-run-systemd-udev')
334 install="nosh-run-busybox-mdev.install"
336 nosh-run-suckless-mdev)
337 pkgdesc="Run SuckLess mdev as the device manager"
338 depends+=( 'nosh-common' 'nosh-exec' 'nosh-service-management>=1.33' 'nosh-bundles' 'smdev')
339 conflicts+=('nosh-run-udev' 'nosh-run-busybox-mdev' 'nosh-run-vdev' 'nosh-run-systemd-udev')
340 install="nosh-run-suckless-mdev.install"
343 pkgdesc="Run vdev as the device manager"
344 depends+=( 'nosh-common' 'nosh-exec' 'nosh-service-management' 'nosh-bundles' 'vdev-git')
345 conflicts+=('nosh-run-busybox-mdev' 'nosh-run-suckless-mdev' 'nosh-run-udev' 'nosh-run-systemd-udev')
346 # no run script so far
347 # install="nosh-run-vdev.install"
350 pkgdesc="Run new-style application-mode virtual terminals"
351 depends+=( 'nosh-common' 'nosh-exec' 'nosh-service-management>=1.33' 'nosh-terminal-management' 'nosh-bundles' )
352 install="nosh-run-user-vt.install"
354 nosh-run-freedesktop-system-bus)
355 pkgdesc="Run the system-wide message bus from freedesktop.org"
356 depends+=( 'nosh-common' 'nosh-exec' 'nosh-service-management>=1.33' 'nosh-bundles' )
357 install="nosh-run-freedesktop-system-bus.install"
359 nosh-run-freedesktop-kits)
360 pkgdesc="Run the various "kit" programs from freedesktop.org"
361 depends+=( 'nosh-common' 'nosh-exec' 'nosh-service-management>=1.33' 'nosh-bundles' )
362 install="nosh-run-freedesktop-kits.install"
364 nosh-run-virtualbox-guest)
365 pkgdesc="Run VirtualBox guest additions"
366 depends+=( 'nosh-common' 'nosh-exec' 'nosh-service-management>=1.33' 'nosh-bundles' )
367 install="nosh-run-virtualbox-guest.install"
370 pkgdesc="Run the klog service"
371 depends+=( 'nosh-common' 'nosh-exec' 'nosh-service-management>=1.33' 'nosh-bundles' )
372 #conflicts+=( 'systemd' )
373 install="nosh-run-klog.install"
375 nosh-run-local-syslog)
376 pkgdesc="Run the local syslog service"
377 depends+=( 'nosh-common' 'nosh-exec' 'nosh-service-management>=1.33' 'nosh-bundles' )
378 #conflicts+=( 'systemd' )
379 install="nosh-run-local-syslog.install"
381 nosh-run-debian-server-base)
382 pkgdesc="Run the local syslog service"
383 depends+=( 'nosh-common' 'nosh-exec' 'nosh-service-management>=1.33' 'nosh-bundles>=1.33' 'nosh-terminal-management' )
384 conflicts+=( 'nosh-run-desktop-base' 'nosh-bundles<=1.32')
385 install="nosh-run-debian-server-base.install"
387 nosh-run-debian-desktop-base)
388 pkgdesc="Run the local syslog service"
389 depends+=( 'nosh-common' 'nosh-exec' 'nosh-service-management>=1.33' 'nosh-bundles>=1.33' 'nosh-terminal-management' )
390 conflicts+=( 'nosh-run-server-base' 'nosh-bundles<=1.32')
391 install="nosh-run-debian-desktop-base.install"
393 nosh-run-openssh-server)
394 pkgdesc="Run the OpenSSH server"
395 depends+=( 'nosh-common' 'nosh-exec' 'nosh-service-management>=1.33' 'nosh-bundles' )
396 install="nosh-run-openssh-server.install"
400 # copy over the staging files
401 (cd "${srcdir}"/staging/"${1}"/ && pax -r -w -l -- * "${pkgdir}"/)