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-busybox-mdev'
28 'nosh-run-suckless-mdev'
31 'nosh-run-freedesktop-system-bus'
32 'nosh-run-freedesktop-kits'
33 'nosh-run-virtualbox-guest'
35 'nosh-run-local-syslog'
36 'nosh-run-debian-server-base'
37 'nosh-run-debian-desktop-base'
38 'nosh-run-openssh-server'
42 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."
44 url="https://jdebp.eu/Softwares/nosh/index.html"
45 license=('custom:MIT Expat' 'custom:FreeBSD' 'custom:ISC' 'custom:Simplified BSD')
48 makedepends=('pax' 'docbook-xml' 'docbook-xsl' 'xmlto' 'libtinfo' 'redo-jdebp')
59 # packages with maintenance scripts
64 "nosh-run-local-syslog"
65 "nosh-run-via-systemd"
66 "nosh-run-busybox-mdev"
67 "nosh-run-openssh-server"
68 "nosh-run-via-systemd"
69 "nosh-run-freedesktop-kits"
70 "nosh-run-suckless-mdev"
71 "nosh-run-freedesktop-system-bus"
72 "nosh-run-system-manager"
73 "nosh-run-virtualbox-guest"
76 "nosh-run-debian-server-base"
77 "nosh-run-debian-desktop-base"
78 "nosh-run-openssh-server"
81 # no point in distributing empty files, create them now, they are filled in later
82 for i in ${_pkginstalls[@]}
87 source=("https://jdebp.eu/Repository/freebsd/nosh-$pkgver.tar.gz"
89 "maintenance-scripts.patch"
94 "nosh-bundles.install"
95 "nosh-run-klog.install"
96 "nosh-run-user-vt.install"
97 "nosh-run-local-syslog.install"
98 "nosh-run-via-systemd.install"
99 "nosh-run-busybox-mdev.install"
100 "nosh-run-openssh-server.install"
101 "nosh-run-via-systemd.install"
102 "nosh-run-freedesktop-kits.install"
103 "nosh-run-suckless-mdev.install"
104 "nosh-run-freedesktop-system-bus.install"
105 "nosh-run-system-manager.install"
106 "nosh-run-virtualbox-guest.install"
107 "nosh-run-kernel-vt.install"
108 "nosh-run-udev.install"
109 "nosh-run-debian-server-base.install"
110 "nosh-run-debian-desktop-base.install"
111 "nosh-run-openssh-server.install"
114 sha256sums=('dc5e5e7f55322758a039f33016110573af3b9c539db1a40d5a36d1bc747f1360'
115 'ceab03a0b164c16b1189e46e1db45e71e83c5612ea01c639d750437cbeb6ff58'
116 'bc4fff63166d6347cfc9e160c1882c91ed9551577da563aafa12e32375420887'
117 'a196ede02e8ba88708ab111d25b1c1d60e163ac09fc9be3c1783daea2cfc102e'
118 'd2ee01d6d41caa8015eb74eb37525de3d45c5bb071c8785fe245884aa19f20ac'
119 '429755272a87b062d97dbaa9c146d551d8b20b6ea3670c5803ddb5b789b829b2'
144 # ncurses headers different to Debian layout, patch out the ncursesw directory in cpp Includes
145 # taken from https://github.com/atweiden/pkgbuilds/blob/master/nosh/PKGBUILD
146 msg2 "Fix ncurses header import issues"
147 cd "${srcdir}"/source
148 find . -type f -print0 | xargs -0 sed -i 's@ncursesw/curses\.h@curses.h@g'
150 # patch package/stage for Archlinux filesystem layout
151 msg2 "Align staging with Arch FS hierarchy guidelines"
153 patch -p1 -i "${srcdir}"/staging.patch
155 # patch debian maintenance scripts
156 msg2 "Adapting maintenance scripts"
157 cd "${srcdir}"/package/debian
158 sed -i 's@usr/local/lib@usr/lib@g' nosh-run-via-systemd.postinst.extra
160 patch -p1 -i "${srcdir}"/maintenance-scripts.patch
162 # rename debian maintenance scripts to Archlinux nomenclature
163 msg2 "Renaming maintenance scripts"
164 cd "${srcdir}"/package/debian
165 source "${srcdir}"/maintenance.sh
167 # patch service files
168 msg2 "Modifying service files"
170 patch -p1 -i "${srcdir}"/services-dbus.patch
175 msg2 "Building main source"
176 "${srcdir}"/package/compile
178 msg2 "Generating .install files"
179 source "${srcdir}"/scriptletbuilder.sh
180 for i in ${_pkginstalls[@]}
182 echo "Bulding $i.install"
183 _buildinstall $i > $i.install
186 msg2 "Staging packages"
187 # stage packages to 'staging' directory
188 "${srcdir}"/package/stage "${srcdir}" "${srcdir}"/staging
192 # no test available for the moment
193 msg "Checking skipped..."
196 package_nosh-common() {
198 # provide license (can't be done in each package, it creates file conflicts on install)
199 install -Dm 644 "${srcdir}"/source/COPYING "${pkgdir}"/usr/share/licenses/nosh/COPYING
203 # refactor the packaging, need special case for non-conforming package
204 for _pkg in ${pkgname[@]}
206 if test "$_pkg" != "nosh-common"
208 eval "package_${_pkg}() { _package $_pkg; }"
216 pkgdesc="Z Shell completion functions for the nosh toolset"
217 depends+=( 'nosh-common')
218 optdepends=( 'zsh: for actual ZSH support' )
221 pkgdesc="User guide for the various nosh-* packages"
222 depends+=( 'nosh-common')
225 pkgdesc="Minimal non-shell script processor and various chain-load utilities useful for services"
226 depends+=( 'nosh-common')
229 pkgdesc="Execline utility shims"
230 depends+=( 'nosh-common' 'nosh-exec')
231 conflicts+=( 'execline' )
234 pkgdesc="Core utility shims"
235 depends+=( 'nosh-common' 'nosh-exec')
236 conflicts+=( 'coreutils' 'util-linux' )
238 nosh-service-management)
239 pkgdesc="Service and system management utilities"
240 depends+=( 'nosh-common')
241 conflicts+=( 'nosh-bundles<=1.30')
243 nosh-terminal-management)
244 pkgdesc="Virtual terminal, pseudo-terminal, and TUI login tools"
245 depends+=( 'nosh-common' 'nosh-service-management>=1.14' )
246 conflicts+=( 'nosh-bundles<=1.20')
248 nosh-run-system-manager)
249 pkgdesc="Run the nosh system manager"
250 depends+=( 'nosh-common' 'nosh-service-management>=1.33' 'nosh-exec' 'nosh-bundles' 'redo-jdebp')
251 conflicts+=( 'nosh-run-via-systemd' 'upstart' 'sysvinit' 'systemd-sysvcompat') #'systemd'
252 install="nosh-run-system-manager.install"
254 nosh-ucspi-tcp-shims)
255 pkgdesc="Bernstein UCSPI-TCP shim service utilities"
256 depends+=( 'nosh-common' 'nosh-exec' )
257 conflicts+=( 'ucspi-tcp' 'nosh-exec<=1.32')
259 nosh-terminal-extras)
260 pkgdesc="Extra terminal utilities"
261 depends+=( 'nosh-common' 'nosh-terminal-management' )
264 pkgdesc="Systemd shim service and system management utilities"
265 depends+=( 'nosh-common' 'nosh-service-management' )
266 conflicts+=( 'systemd' )
269 pkgdesc="BSD and System 5 shim service and system management utilities"
270 depends+=( 'nosh-common' 'nosh-service-management' )
271 conflicts+=( 'systemd-sysvcompat')
274 pkgdesc="Upstart shim service and system management utilities"
275 depends+=( 'nosh-common' 'nosh-service-management' )
278 pkgdesc="Debian shim service and system management utilities"
279 depends+=( 'nosh-common' 'nosh-service-management' )
280 conflicts+=( 'nosh-run-via-systemd' 'upstart' 'sysvinit' 'systemd' )
283 pkgdesc="OpenBSD shim service and system management utilities"
284 depends+=( 'nosh-common' 'nosh-service-management' 'nosh-systemv-shims<=1.28' )
285 conflicts+=( 'nosh-systemv-shims<=1.27')
288 pkgdesc="BSD shim service and system management utilities"
289 depends+=( 'nosh-common' 'nosh-service-management' )
290 conflicts+=( 'android-tools' )
293 pkgdesc="shim kbd utilities"
294 depends+=( 'nosh-common' 'nosh-terminal-management' )
298 pkgdesc="Service bundles"
299 depends+=( 'nosh-common' 'nosh-service-management>=1.33' 'nosh-exec>=1.32' 'nosh-terminal-management>=1.22' 'shadow' )
300 install="nosh-bundles.install"
302 nosh-run-via-systemd)
303 pkgdesc="Run the nosh service manager and daemontools service scanner via systemd"
304 depends+=( 'nosh-common' 'nosh-service-management>=1.33' 'systemd' 'nosh-bundles' )
305 install="nosh-run-via-systemd.install"
308 pkgdesc="Run old-style kernel virtual terminals"
309 depends+=( 'nosh-common' 'nosh-exec' 'nosh-service-management>=1.33' 'nosh-terminal-management' 'nosh-bundles' )
310 install="nosh-run-kernel-vt.install"
313 pkgdesc="Run udev as the device manager"
314 depends+=( 'nosh-common' 'nosh-exec' 'nosh-service-management>=1.16' 'nosh-bundles' )
315 optdepends+=( 'systemd: the systemd implementation currently does not work with nosh' 'eudev: for an alternative udev implementation' )
316 conflicts+=('nosh-run-busybox-mdev' 'nosh-run-suckless-mdev' 'nosh-run-vdev')
317 install="nosh-run-udev.install"
319 nosh-run-busybox-mdev)
320 pkgdesc="Run BusyBox mdev as the device manager"
321 depends+=( 'nosh-common' 'nosh-exec' 'nosh-service-management>=1.16' 'nosh-bundles' 'busybox')
322 conflicts+=('nosh-run-udev' 'nosh-run-suckless-mdev' 'nosh-run-vdev')
323 install="nosh-run-busybox-mdev.install"
325 nosh-run-suckless-mdev)
326 pkgdesc="Run SuckLess mdev as the device manager"
327 depends+=( 'nosh-common' 'nosh-exec' 'nosh-service-management>=1.16' 'nosh-bundles' 'smdev')
328 conflicts+=('nosh-run-udev' 'nosh-run-busybox-mdev' 'nosh-run-vdev')
329 install="nosh-run-suckless-mdev.install"
332 pkgdesc="Run vdev as the device manager"
333 depends+=( 'nosh-common' 'nosh-exec' 'nosh-service-management' 'nosh-bundles' 'vdev-git')
334 conflicts+=('nosh-run-busybox-mdev' 'nosh-run-suckless-mdev' 'nosh-run-udev')
335 # no run script so far
336 # install="nosh-run-vdev.install"
339 pkgdesc="Run new-style application-mode virtual terminals"
340 depends+=( 'nosh-common' 'nosh-exec' 'nosh-service-management>=1.33' 'nosh-terminal-management' 'nosh-bundles' )
341 install="nosh-run-user-vt.install"
343 nosh-run-freedesktop-system-bus)
344 pkgdesc="Run the system-wide message bus from freedesktop.org"
345 depends+=( 'nosh-common' 'nosh-exec' 'nosh-service-management>=1.33' 'nosh-bundles' )
346 install="nosh-run-freedesktop-system-bus.install"
348 nosh-run-freedesktop-kits)
349 pkgdesc="Run the various "kit" programs from freedesktop.org"
350 depends+=( 'nosh-common' 'nosh-exec' 'nosh-service-management>=1.33' 'nosh-bundles' )
351 install="nosh-run-freedesktop-kits.install"
353 nosh-run-virtualbox-guest)
354 pkgdesc="Run VirtualBox guest additions"
355 depends+=( 'nosh-common' 'nosh-exec' 'nosh-service-management>=1.33' 'nosh-bundles' )
356 install="nosh-run-virtualbox-guest.install"
359 pkgdesc="Run the klog service"
360 depends+=( 'nosh-common' 'nosh-exec' 'nosh-service-management>=1.33' 'nosh-bundles' )
361 #conflicts+=( 'systemd' )
362 install="nosh-run-klog.install"
364 nosh-run-local-syslog)
365 pkgdesc="Run the local syslog service"
366 depends+=( 'nosh-common' 'nosh-exec' 'nosh-service-management>=1.33' 'nosh-bundles' )
367 #conflicts+=( 'systemd' )
368 install="nosh-run-local-syslog.install"
370 nosh-run-debian-server-base)
371 pkgdesc="Run the local syslog service"
372 depends+=( 'nosh-common' 'nosh-exec' 'nosh-service-management>=1.33' 'nosh-bundles>=1.33' 'nosh-terminal-management' )
373 conflicts+=( 'nosh-run-desktop-base' 'nosh-bundles<=1.32')
374 install="nosh-run-debian-server-base.install"
376 nosh-run-debian-desktop-base)
377 pkgdesc="Run the local syslog service"
378 depends+=( 'nosh-common' 'nosh-exec' 'nosh-service-management>=1.33' 'nosh-bundles>=1.33' 'nosh-terminal-management' )
379 conflicts+=( 'nosh-run-server-base' 'nosh-bundles<=1.32')
380 install="nosh-run-debian-desktop-base.install"
382 nosh-run-openssh-server)
383 pkgdesc="Run the OpenSSH server"
384 depends+=( 'nosh-common' 'nosh-exec' 'nosh-service-management>=1.33' 'nosh-bundles' )
385 install="nosh-run-openssh-server.install"
389 # copy over the staging files
390 (cd "${srcdir}"/staging/"${1}"/ && pax -r -w -l -- * "${pkgdir}"/)