PKGBUILD 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160
  1. # Maintainer: David P. <megver83@parabola.nu>
  2. # Maintainer (arch): Sébastien Luttringer
  3. # Contributor: Tom Gundersen <teg@jklm.no>
  4. # Contributor: Omar Vega Ramos <ovruni@gnu.org.pe>
  5. # Contributor: Nicolás Reynolds <fauno@kiwwwi.com.ar>
  6. # Contributor: bill-auger <bill-auger@programmer.net>
  7. # parabola changes and rationale:
  8. # - parabola branding (os-release,motd,icon,logo)
  9. # - systemd-specific 'env-generator' is not used for nonsystemd
  10. pkgname=filesystem
  11. pkgver=2021.12.07
  12. pkgrel=1
  13. pkgrel+=.parabola1
  14. pkgrel+=.nonsystemd1
  15. pkgdesc='Base Parabola GNU/Linux-libre files'
  16. arch=('x86_64')
  17. arch+=('armv7h' 'i686' 'ppc64le')
  18. license=('GPL')
  19. url='https://www.parabola.nu'
  20. depends=('iana-etc')
  21. backup=('etc/crypttab' 'etc/fstab' 'etc/group' 'etc/gshadow' 'etc/host.conf'
  22. 'etc/hosts' 'etc/issue' 'etc/ld.so.conf' 'etc/nsswitch.conf'
  23. 'etc/passwd' 'etc/profile' 'etc/resolv.conf' 'etc/securetty'
  24. 'etc/shadow' 'etc/shells')
  25. backup+=('etc/motd')
  26. source=('crypttab' 'env-generator' 'fstab' 'group' 'gshadow' 'host.conf' 'hosts'
  27. 'issue' 'ld.so.conf' 'locale.sh' 'nsswitch.conf' 'os-release'
  28. 'passwd' 'profile' 'resolv.conf' 'securetty' 'shadow' 'shells' 'sysctl'
  29. 'sysusers' 'tmpfiles' 'archlinux-logo.svg' 'archlinux-logo.png'
  30. 'archlinux-logo-text.svg' 'archlinux-logo-text-dark.svg')
  31. source=( ${source[*]/env-generator/} )
  32. source=( ${source[*]//archlinux-logo/parabola-logo} )
  33. source+=('motd')
  34. sha256sums=('e03bede3d258d680548696623d5979c6edf03272e801a813c81ba5a5c64f4f82'
  35. # (env-generator is not used for nonsystemd)
  36. 'e54626e74ed8fee4173b62a545ab1c3a3a069e4217a0ee8fc398d9933e9c1696'
  37. '244f0718ee2a9d6862ae59d6c18c1dd1568651eada91a704574fa527fbac2b3a'
  38. '90d879374f77bac47f132164c1e7fc4892e994ff1d1ac376efa0c1c26ea37273'
  39. '4d7b647169063dfedbff5e1e22cee77bd1a4183dbcfd5e802e68939da4bbf733'
  40. 'd9cd8a77d9e0aa5e90d7f4ed74c8745c17b525e720e28e4c44364150003c35f9'
  41. '8b8f24af3454e87b4e316b4978d0de7958a98cc44606aa801d9696d2c21f4385' # issue
  42. 'dad04a370e488aa85fb0a813a5c83cf6fd981ce01883fc59685447b092de84b5'
  43. '8ca2d8eef6fb5143c9ef7e9174ccfef59ac7ad2deee243574cd10c763156cc10'
  44. 'aa4dc5b2374fb32863e3bc1ce20a2de2d34fe4eed1cd63c599bc82fab21463cc' # nsswitch.conf
  45. 'af2eee47719566740b750f0806e897a8439656df4a7476bb6e71465fd075b45d' # os-release
  46. '5e06477834f51abf42ea4e8dc199632afc6afbfd8c44354685a271e9a48d2c0a'
  47. '5e4088ad8d0853d390fa303f6be8c3f69c33834200cba9e90f7849f1993ca8d0'
  48. '5557d8e601b17a80d1ea7de78a9869be69637cb6a02fbfe334e22fdf64e61d4c'
  49. 'd88be2b45b43605ff31dd83d6a138069b6c2e92bc8989b7b9ab9eba8da5f8c7b'
  50. '6e13705ac4d6f69cdba118c6b70c722346fd3c45224133e6bbfe28aca719563c'
  51. 'c390b31fffc4a2b5d78ae8c89f5317aadef1f71baac09cfb467b675db1406d61'
  52. '89e43a0b7028f52d5c8e7fb961d962c4b4f4e9595880a6157274ddb2c7c0b6b4'
  53. '04dd4cbe5078f5181176ade3a82f333e3f48091b118360d69cc45a3526503818' # sysusers
  54. 'f17efd1c6480c5db1fdab4a0e3cfcd4baa44a3e1ae1210aebeb40f8d5c82f742'
  55. 'd5f0a4f75761afd5ebbc6970ac9aba5be3c28bb660adf7118353a0e018911e68' # parabola-logo.svg
  56. 'c6486f4c9456fa62a75727adfcc8f2403a1a9fac29386f942c0678c109cc72e8' # parabola-logo.png
  57. '09838fea00c5ceff6e7ed28bb1b6d62feb1e2471df9fe5a4328071ecb9e837f3' # parabola-logo-text.svg
  58. 'bc9be3442fab17ac6990814db4c0cc76c2ac6112c70a6c103530f607aa54c11e') # parabola-logo-text-dark.svg
  59. sha256sums+=('0018e0387155ee65472f71f0003fcbcb863355d12442150922e7156da12cabad') # motd
  60. prepare() {
  61. # inject OS variant information into os-release
  62. local init='OpenRC'
  63. sed -i "s|@VARIANT@|${CARCH} ${init} Edition|" "${srcdir}"/os-release
  64. sed -i "s|@VARIANT_ID@|${CARCH}-${init,,}|" "${srcdir}"/os-release
  65. }
  66. package() {
  67. cd "$pkgdir"
  68. # setup root filesystem
  69. for d in boot dev etc home mnt usr var opt srv/http run; do
  70. install -d -m755 $d
  71. done
  72. install -d -m555 proc
  73. install -d -m555 sys
  74. install -d -m0750 root
  75. install -d -m1777 tmp
  76. # vsftpd won't run with write perms on /srv/ftp
  77. # ftp (uid 14/gid 11)
  78. install -d -m555 -g 11 srv/ftp
  79. # setup /etc and /usr/share/factory/etc
  80. install -d etc/{ld.so.conf.d,skel,profile.d} usr/share/factory/etc
  81. for f in fstab group host.conf hosts issue ld.so.conf nsswitch.conf \
  82. passwd resolv.conf securetty shells profile; do
  83. install -m644 "$srcdir"/$f etc/
  84. install -m644 "$srcdir"/$f usr/share/factory/etc/
  85. done
  86. ln -s ../proc/self/mounts etc/mtab
  87. for f in gshadow shadow crypttab; do
  88. install -m600 "$srcdir"/$f etc/
  89. install -m600 "$srcdir"/$f usr/share/factory/etc/
  90. done
  91. touch etc/arch-release
  92. touch etc/parabola-release
  93. install -m644 "$srcdir"/motd etc/
  94. install -m644 "$srcdir"/locale.sh etc/profile.d/locale.sh
  95. install -Dm644 "$srcdir"/os-release usr/lib/os-release
  96. # setup /var
  97. for d in cache local opt log/old lib/misc empty; do
  98. install -d -m755 var/$d
  99. done
  100. install -d -m1777 var/{tmp,spool/mail}
  101. # allow setgid games (gid 50) to write scores
  102. install -d -m775 -g 50 var/games
  103. ln -s spool/mail var/mail
  104. ln -s ../run var/run
  105. ln -s ../run/lock var/lock
  106. # setup /usr hierarchy
  107. for d in bin include lib share/{misc,pixmaps} src; do
  108. install -d -m755 usr/$d
  109. done
  110. for d in {1..8}; do
  111. install -d -m755 usr/share/man/man$d
  112. done
  113. # add lib symlinks
  114. ln -s usr/lib lib
  115. [[ $CARCH = 'ppc64le' ]] || \
  116. [[ $CARCH = 'x86_64' ]] && {
  117. ln -s usr/lib lib64
  118. ln -s lib usr/lib64
  119. }
  120. # add bin symlinks
  121. ln -s usr/bin bin
  122. ln -s usr/bin sbin
  123. ln -s bin usr/sbin
  124. # setup /usr/local hierarchy
  125. for d in bin etc games include lib man sbin share src; do
  126. install -d -m755 usr/local/$d
  127. done
  128. ln -s ../man usr/local/share/man
  129. # setup sysctl
  130. install -D -m644 "$srcdir"/sysctl usr/lib/sysctl.d/10-arch.conf
  131. # setup sysusers
  132. install -D -m644 "$srcdir"/sysusers usr/lib/sysusers.d/arch.conf
  133. # setup tmpfiles
  134. install -D -m644 "$srcdir"/tmpfiles usr/lib/tmpfiles.d/arch.conf
  135. # setup systemd.environment-generator
  136. # (env-generator is not used for nonsystemd)
  137. # add logo
  138. install -D -m644 "$srcdir"/parabola-logo{.png,.svg,-text.svg,-text-dark.svg} usr/share/pixmaps
  139. }