PKGBUILD 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140
  1. # Maintainer: David P. <megver83@parabola.nu>
  2. # Maintainer (Arch): Sébastien Luttringer
  3. # Contributor (Arch): Tom Gundersen <teg@jklm.no>
  4. pkgname=filesystem
  5. pkgver=2020.09.03
  6. pkgrel=1
  7. pkgrel+=.nonsystemd1
  8. pkgdesc='Base Parabola GNU/Linux-libre files'
  9. arch=('x86_64')
  10. arch+=('armv7h' 'i686' 'ppc64le')
  11. license=('GPL')
  12. url='https://www.parabola.nu'
  13. depends=('iana-etc')
  14. backup=('etc/crypttab' 'etc/fstab' 'etc/group' 'etc/gshadow' 'etc/host.conf'
  15. 'etc/hosts' 'etc/issue' 'etc/ld.so.conf' 'etc/motd' 'etc/nsswitch.conf'
  16. 'etc/passwd' 'etc/profile' 'etc/resolv.conf' 'etc/securetty'
  17. 'etc/shadow' 'etc/shells')
  18. source=('crypttab' 'env-generator' 'fstab' 'group' 'gshadow' 'host.conf' 'hosts'
  19. 'issue' 'ld.so.conf' 'locale.sh' 'motd' 'nsswitch.conf' 'os-release'
  20. 'passwd' 'profile' 'resolv.conf' 'securetty' 'shadow' 'shells' 'sysctl'
  21. 'sysusers' 'tmpfiles' 'parabola.svg' 'parabola.png'
  22. 'parabola-logo.svg' 'parabola-logo.png')
  23. sha256sums=('e03bede3d258d680548696623d5979c6edf03272e801a813c81ba5a5c64f4f82'
  24. 'ed0cb4f1db4021f8c3b5ce78fdf91d2c0624708f58f36c9cf867f4d93c3bc6da'
  25. 'e54626e74ed8fee4173b62a545ab1c3a3a069e4217a0ee8fc398d9933e9c1696'
  26. '244f0718ee2a9d6862ae59d6c18c1dd1568651eada91a704574fa527fbac2b3a'
  27. '90d879374f77bac47f132164c1e7fc4892e994ff1d1ac376efa0c1c26ea37273'
  28. '4d7b647169063dfedbff5e1e22cee77bd1a4183dbcfd5e802e68939da4bbf733'
  29. 'd9cd8a77d9e0aa5e90d7f4ed74c8745c17b525e720e28e4c44364150003c35f9'
  30. '8b8f24af3454e87b4e316b4978d0de7958a98cc44606aa801d9696d2c21f4385'
  31. 'dad04a370e488aa85fb0a813a5c83cf6fd981ce01883fc59685447b092de84b5'
  32. '8ca2d8eef6fb5143c9ef7e9174ccfef59ac7ad2deee243574cd10c763156cc10'
  33. 'e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855'
  34. 'aa4dc5b2374fb32863e3bc1ce20a2de2d34fe4eed1cd63c599bc82fab21463cc'
  35. '1fb18c22836c5b679d183a504e594f14d2fdbeb7ce97dd3de5a0c88299f3d597'
  36. '5e06477834f51abf42ea4e8dc199632afc6afbfd8c44354685a271e9a48d2c0a'
  37. '5e4088ad8d0853d390fa303f6be8c3f69c33834200cba9e90f7849f1993ca8d0'
  38. '5557d8e601b17a80d1ea7de78a9869be69637cb6a02fbfe334e22fdf64e61d4c'
  39. 'd88be2b45b43605ff31dd83d6a138069b6c2e92bc8989b7b9ab9eba8da5f8c7b'
  40. '6e13705ac4d6f69cdba118c6b70c722346fd3c45224133e6bbfe28aca719563c'
  41. 'c390b31fffc4a2b5d78ae8c89f5317aadef1f71baac09cfb467b675db1406d61'
  42. '89e43a0b7028f52d5c8e7fb961d962c4b4f4e9595880a6157274ddb2c7c0b6b4'
  43. 'efe43c88d70ef55c4461d06a63f682cf1e95bd13b585f14d9061517b07d85669'
  44. '618ac097441c1f2daffc9967e5c3cd18ea8866f776db62d04bf401c53907b1c9'
  45. 'cb8ece3772744ef162d0ff6018e6a7051889c2aba1bf6439ba9e74a64ac46927'
  46. '826c61cb40bb0b31e2071b21e04ad7f8c6aabe2817e681246569ae9dff81cd9b'
  47. 'cb8ece3772744ef162d0ff6018e6a7051889c2aba1bf6439ba9e74a64ac46927'
  48. '826c61cb40bb0b31e2071b21e04ad7f8c6aabe2817e681246569ae9dff81cd9b')
  49. package() {
  50. cd "$pkgdir"
  51. # setup root filesystem
  52. for d in boot dev etc home mnt usr var opt srv/http run; do
  53. install -d -m755 $d
  54. done
  55. install -d -m555 proc
  56. install -d -m555 sys
  57. install -d -m0750 root
  58. install -d -m1777 tmp
  59. # vsftpd won't run with write perms on /srv/ftp
  60. # ftp (uid 14/gid 11)
  61. install -d -m555 -g 11 srv/ftp
  62. # setup /etc and /usr/share/factory/etc
  63. install -d etc/{ld.so.conf.d,skel,profile.d} usr/share/factory/etc
  64. for f in fstab group host.conf hosts issue ld.so.conf motd nsswitch.conf \
  65. passwd resolv.conf securetty shells profile; do
  66. install -m644 "$srcdir"/$f etc/
  67. install -m644 "$srcdir"/$f usr/share/factory/etc/
  68. done
  69. ln -s ../proc/self/mounts etc/mtab
  70. for f in gshadow shadow crypttab; do
  71. install -m600 "$srcdir"/$f etc/
  72. install -m600 "$srcdir"/$f usr/share/factory/etc/
  73. done
  74. touch etc/parabola-release
  75. ln -sv parabola-release etc/arch-release
  76. install -m644 "$srcdir"/locale.sh etc/profile.d/locale.sh
  77. install -Dm644 "$srcdir"/os-release usr/lib/os-release
  78. # setup /var
  79. for d in cache local opt log/old lib/misc empty; do
  80. install -d -m755 var/$d
  81. done
  82. install -d -m1777 var/{tmp,spool/mail}
  83. # allow setgid games (gid 50) to write scores
  84. install -d -m775 -g 50 var/games
  85. ln -s spool/mail var/mail
  86. ln -s ../run var/run
  87. ln -s ../run/lock var/lock
  88. # setup /usr hierarchy
  89. for d in bin include lib share/{misc,pixmaps} src; do
  90. install -d -m755 usr/$d
  91. done
  92. for d in {1..8}; do
  93. install -d -m755 usr/share/man/man$d
  94. done
  95. # add lib symlinks
  96. ln -s usr/lib lib
  97. [[ $CARCH = 'x86_64' ]] && {
  98. ln -s usr/lib lib64
  99. ln -s lib usr/lib64
  100. }
  101. [[ $CARCH = 'powerpc64le' ]] && {
  102. ln -s usr/lib lib64
  103. ln -s lib usr/lib64
  104. }
  105. # add bin symlinks
  106. ln -s usr/bin bin
  107. ln -s usr/bin sbin
  108. ln -s bin usr/sbin
  109. # setup /usr/local hierarchy
  110. for d in bin etc games include lib man sbin share src; do
  111. install -d -m755 usr/local/$d
  112. done
  113. ln -s ../man usr/local/share/man
  114. # setup sysctl
  115. install -D -m644 "$srcdir"/sysctl usr/lib/sysctl.d/10-arch.conf
  116. # setup opensysusers
  117. install -D -m644 "$srcdir"/sysusers usr/lib/sysusers.d/arch.conf
  118. # setup opentmpfiles
  119. install -D -m644 "$srcdir"/tmpfiles usr/lib/tmpfiles.d/arch.conf
  120. # setup systemd.environment-generator
  121. # (env-generator is not used for nonsystemd)
  122. # add logo
  123. install -D -m644 "$srcdir"/parabola{,-logo}.{svg,png} usr/share/pixmaps
  124. }