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 '5986a9ba82271d62b107266242fb82384e578aac6326dbf80cecf31f2a8c86f5' # 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' 'nosh-bundles<=1.33')
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' 'glibc>=2.13')
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.34' 'nosh-exec>=1.34' '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"
311 backup=( 'usr/share/system-control/presets/80-disable-sysinit.preset'
312 'usr/share/system-control/presets/80-disable-dbus.preset'
313 'usr/share/system-control/presets/80-disable-local-syslog.preset'
314 'usr/share/system-control/presets/80-disable-remote-fs.preset'
315 'usr/share/system-control/presets/80-disable-networking.preset'
319 pkgdesc="Run old-style kernel virtual terminals"
320 depends+=( 'nosh-common' 'nosh-exec' 'nosh-service-management>=1.33' 'nosh-terminal-management' 'nosh-bundles' )
321 install="nosh-run-kernel-vt.install"
322 backup=( 'usr/share/system-control/presets/80-linux-ttylogin-tty.preset'
323 'usr/share/system-control/presets/80-enable-kernel-vt.preset'
327 pkgdesc="Run udev as the device manager"
328 depends+=( 'nosh-common' 'nosh-exec' 'nosh-service-management>=1.33' 'nosh-bundles' )
329 optdepends+=( 'eudev: alternative udev implementation' )
330 conflicts+=('nosh-run-busybox-mdev' 'nosh-run-suckless-mdev' 'nosh-run-vdev' 'nosh-run-systemd-udev')
331 install="nosh-run-udev.install"
332 backup=( 'usr/share/system-control/presets/80-enable-udev.preset' )
334 nosh-run-systemd-udev)
335 pkgdesc="Run systemd-udev as the device manager"
336 depends+=( 'nosh-common' 'nosh-exec' 'nosh-service-management>=1.33' 'nosh-bundles>=1.34' 'systemd')
337 conflicts+=('nosh-run-busybox-mdev' 'nosh-run-suckless-mdev' 'nosh-run-vdev' 'nosh-run-udev')
338 install="nosh-run-systemd-udev.install"
339 backup=( 'usr/share/system-control/presets/80-enable-systemd-udev.preset' )
341 nosh-run-busybox-mdev)
342 pkgdesc="Run BusyBox mdev as the device manager"
343 depends+=( 'nosh-common' 'nosh-exec' 'nosh-service-management>=1.33' 'nosh-bundles' 'busybox')
344 conflicts+=('nosh-run-udev' 'nosh-run-suckless-mdev' 'nosh-run-vdev' 'nosh-run-systemd-udev')
345 install="nosh-run-busybox-mdev.install"
346 backup=( 'usr/share/system-control/presets/80-enable-busybox-mdev.preset' )
348 nosh-run-suckless-mdev)
349 pkgdesc="Run SuckLess mdev as the device manager"
350 depends+=( 'nosh-common' 'nosh-exec' 'nosh-service-management>=1.33' 'nosh-bundles' 'smdev')
351 conflicts+=('nosh-run-udev' 'nosh-run-busybox-mdev' 'nosh-run-vdev' 'nosh-run-systemd-udev')
352 install="nosh-run-suckless-mdev.install"
353 backup=( 'usr/share/system-control/presets/80-enable-suckless-mdev.preset' )
356 pkgdesc="Run vdev as the device manager"
357 depends+=( 'nosh-common' 'nosh-exec' 'nosh-service-management' 'nosh-bundles' 'vdev-git')
358 conflicts+=('nosh-run-busybox-mdev' 'nosh-run-suckless-mdev' 'nosh-run-udev' 'nosh-run-systemd-udev')
359 # no run script so far
360 # install="nosh-run-vdev.install"
361 backup=( 'usr/share/system-control/presets/80-enable-vdev.preset' )
364 pkgdesc="Run new-style application-mode virtual terminals"
365 depends+=( 'nosh-common' 'nosh-exec' 'nosh-service-management>=1.33' 'nosh-terminal-management' 'nosh-bundles' )
366 install="nosh-run-user-vt.install"
367 backup=( 'usr/share/system-control/presets/80-enable-user-vt.preset'
368 'usr/share/system-control/presets/80-linux-ttylogin-vc.preset'
371 nosh-run-freedesktop-system-bus)
372 pkgdesc="Run the system-wide message bus from freedesktop.org"
373 depends+=( 'nosh-common' 'nosh-exec' 'nosh-service-management>=1.33' 'nosh-bundles' )
374 install="nosh-run-freedesktop-system-bus.install"
375 backup=('usr/share/system-control/presets/80-enable-freedesktop-system-bus.preset' )
377 nosh-run-freedesktop-kits)
378 pkgdesc="Run the various "kit" programs from freedesktop.org"
379 depends+=( 'nosh-common' 'nosh-exec' 'nosh-service-management>=1.33' 'nosh-bundles' )
380 install="nosh-run-freedesktop-kits.install"
381 backup=( 'usr/share/system-control/presets/40-PackageKit.preset'
382 'usr/share/system-control/presets/40-PolicyKit.preset'
383 'usr/share/system-control/presets/40-UPower.preset'
384 'usr/share/system-control/presets/40-ColourManager.preset'
385 'usr/share/system-control/presets/40-ConsoleKit.preset'
386 'usr/share/system-control/presets/40-UDisks.preset'
387 'usr/share/system-control/presets/40-NetworkManager.preset'
388 'usr/share/system-control/presets/40-ModemManager.preset'
389 'usr/share/system-control/presets/40-Avahi.preset'
392 nosh-run-virtualbox-guest)
393 pkgdesc="Run VirtualBox guest additions"
394 depends+=( 'nosh-common' 'nosh-exec' 'nosh-service-management>=1.33' 'nosh-bundles' )
395 install="nosh-run-virtualbox-guest.install"
396 backup=( 'usr/share/system-control/presets/80-virtualbox-guest.preset' )
399 pkgdesc="Run the klog service"
400 depends+=( 'nosh-common' 'nosh-exec' 'nosh-service-management>=1.33' 'nosh-bundles' )
401 #conflicts+=( 'systemd' )
402 install="nosh-run-klog.install"
403 backup=( 'usr/share/system-control/presets/80-enable-klog.preset' )
405 nosh-run-local-syslog)
406 pkgdesc="Run the local syslog service"
407 depends+=( 'nosh-common' 'nosh-exec' 'nosh-service-management>=1.33' 'nosh-bundles' )
408 #conflicts+=( 'systemd' )
409 install="nosh-run-local-syslog.install"
410 backup=( 'usr/share/system-control/presets/80-enable-local-syslog.preset' )
412 nosh-run-debian-server-base)
413 pkgdesc="Run the local syslog service"
414 depends+=( 'nosh-common' 'nosh-exec' 'nosh-service-management>=1.33' 'nosh-bundles>=1.33' 'nosh-terminal-management' )
415 conflicts+=( 'nosh-run-debian-desktop-base' 'nosh-bundles<=1.32')
416 install="nosh-run-debian-server-base.install"
417 backup=( 'usr/share/system-control/presets/90-linux-static-networking.preset'
418 'usr/share/system-control/presets/50-Debian-Server-Basic.preset'
419 'usr/share/system-control/presets/90-linux-boot-essentials.preset'
420 'usr/share/system-control/presets/90-common-boot-essentials.preset'
423 nosh-run-debian-desktop-base)
424 pkgdesc="Run the local syslog service"
425 depends+=( 'nosh-common' 'nosh-exec' 'nosh-service-management>=1.33' 'nosh-bundles>=1.33' 'nosh-terminal-management' )
426 conflicts+=( 'nosh-run-debian-server-base' 'nosh-bundles<=1.32')
427 install="nosh-run-debian-desktop-base.install"
428 backup=( 'usr/share/system-control/presets/90-linux-static-networking.preset'
429 'usr/share/system-control/presets/50-Debian-Server-Basic.preset'
430 'usr/share/system-control/presets/50-Debian-Desktop-Basic.preset'
431 'usr/share/system-control/presets/90-linux-boot-essentials.preset'
432 'usr/share/system-control/presets/90-common-boot-essentials.preset'
435 nosh-run-openssh-server)
436 pkgdesc="Run the OpenSSH server"
437 depends+=( 'nosh-common' 'nosh-exec' 'nosh-service-management>=1.33' 'nosh-bundles' )
438 install="nosh-run-openssh-server.install"
439 backup=( 'usr/share/system-control/presets/40-OpenSSHServer.preset' )
443 # copy over the staging files
444 (cd "${srcdir}"/staging/"${1}"/ && pax -r -w -l -- * "${pkgdir}"/)