PKGBUILD 9.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307
  1. # Maintainer: David P. <megver83@parabola.nu>
  2. # Maintainer (Artix): Christian Hesse <mail@eworm.de>
  3. # Maintainer (Artix): Dave Reisner <dreisner@archlinux.org>
  4. # Maintainer (Artix): Tom Gundersen <teg@jklm.no>
  5. # Remove the 'replaces' variables in package functions in the near future
  6. _pkgbase=systemd
  7. pkgbase=xudev
  8. pkgname=('xudev' 'libxudev' 'etmpfiles' 'esysusers'
  9. 'xudev-docs' 'etmpfiles-docs' 'esysusers-docs')
  10. pkgdesc='Userspace device file manager'
  11. _tag='fd9ad7d3bc35a3633b99edac14ff2a4fb10599b7' # git rev-parse v${pkgver}
  12. _tag_name=248.3
  13. pkgver="${_tag_name/-/}"
  14. pkgrel=2
  15. arch=('x86_64')
  16. arch+=('i686' 'armv7h')
  17. url='https://www.github.com/systemd/systemd'
  18. license=('GPL2' 'LGPL2.1')
  19. makedepends=('acl' 'libacl.so' 'docbook-xsl' 'gperf' 'kbd' 'hwids' 'intltool' 'kmod' 'libkmod.so'
  20. 'libcap' 'libcap.so' 'util-linux' 'libblkid.so' 'git' 'meson' 'rsync')
  21. options=('strip')
  22. validpgpkeys=('63CDA1E5D3FC22B998D20DD6327F26951A015CC4' # Lennart Poettering <lennart@poettering.net>
  23. '5C251B5FC54EB2F80F407AAAC54CA336CFEB557E') # Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
  24. source=("git+https://github.com/systemd/systemd-stable#tag=${_tag}?signed"
  25. "git+https://github.com/systemd/systemd#tag=v${_tag_name%.*}?signed"
  26. '0001-Use-Arch-Linux-device-access-groups.patch'
  27. 'initcpio-hook-udev'
  28. 'initcpio-install-udev'
  29. 'udev-hook'
  30. '20-sysusers.hook'
  31. '30-udev-hwdb.hook'
  32. '30-tmpfiles.hook'
  33. '30-udev-reload.hook')
  34. sha512sums=('SKIP'
  35. 'SKIP'
  36. '0db4a6ee10140bcda5021d6be573180410166b9c30f93037641df7fa733af146ed42bf67bdd4a00bf81bd741d4d4f707decfdb487d95603f98d492e2b51ee21d'
  37. '32606b42856b5f3ea7f485143e532671f58986237e14c58ea5ab17383dc39a375cb6c738c8a2db9e4a8c8be88ea44a876d6bbed129cb2f5c9aa3f8228b04d927'
  38. 'a57b8b34d9ece76342726864dad6d923b461f867c122a069bd521c99c4b951a00a532a8cd30426e678e2c160d00b40a7f6fbb4f1a7a15e47ac6bb5df42fbc4f2'
  39. '8291ae9f1f4ac0cdf007aa84c6240a2b849ad672d47cc0e3f89c1f83819fe7127d9dd6def139099cd470906a5e7e41a0ff6c5d64d106e478a0916023b177d443'
  40. '9a02d97585b9ad5b8016b605ddb35027df3c3a107c8619e568dc3a3cd787eedfb059f8ab5acd578a270e299b63516383ee8d620083bcb1c2fc32cf54f8d5c77d'
  41. 'cee9240dac5888d1dde916429ac25c022e30b5d7c53ba9e699e281021d2224bfd6e4cc4ac1c71c15f768b720d524cac0dabaae06d026a68759f6fe84b4c62751'
  42. '54dd41c1d765923f41e9175bdb4f424b4574215b6c514da474c3d4bdf8cf0c1e7c727e6613456db8bc4698aa9ce1a7a29ad127ad25eb8507b8df2d87546fc5f7'
  43. '5aa475f37d35752a95e73417c38c4d3bc4d15d5f1052e95d75b4c4144b74c79af94da1d1e954be536339f9829a1ceb3a1bc5c6adceb187df7a8e5f5a83e4a850')
  44. _backports=(
  45. )
  46. _reverts=(
  47. )
  48. prepare() {
  49. cd "$_pkgbase-stable"
  50. # add upstream repository for cherry-picking
  51. git remote add -f upstream ../systemd
  52. local _c
  53. for _c in "${_backports[@]}"; do
  54. git log --oneline -1 "${_c}"
  55. git cherry-pick -n "${_c}"
  56. done
  57. for _c in "${_reverts[@]}"; do
  58. git log --oneline -1 "${_c}"
  59. git revert -n "${_c}"
  60. done
  61. # Replace cdrom/dialout/tape groups with optical/uucp/storage
  62. patch -Np1 -i ../0001-Use-Arch-Linux-device-access-groups.patch
  63. }
  64. build() {
  65. if ! [[ "$CARCH" == x86_64 ]]; then
  66. CFLAGS+=" -Wno-error=implicit-function-declaration"
  67. fi
  68. local _meson_options=(
  69. -Dversion-tag="${pkgver}-${pkgrel}-parabola"
  70. -Drootprefix=/usr
  71. -Dgcrypt=false
  72. -Dlibcryptsetup=false
  73. -Dlibidn=false
  74. -Dlibidn2=false
  75. -Dlibiptc=false
  76. -Dseccomp=false
  77. -Dlz4=false
  78. -Dxz=false
  79. -Dstandalone-binaries=true
  80. -Dsysusers=true
  81. -Dtmpfiles=true
  82. -Dhwdb=true
  83. -Dlink-udev-shared=false
  84. -Dgshadow=true
  85. -Dtests=false
  86. -Ddefault-mdns=no
  87. -Dnss-myhostname=false
  88. -Dhostnamed=false
  89. -Dlocaled=false
  90. -Dtimedated=false
  91. -Dadm-group=true
  92. -Dwheel-group=true
  93. -Dman=true
  94. -Defi=false
  95. -Dlibfdisk=false
  96. -Dp11kit=false
  97. -Dima=false
  98. -Dhomed=false
  99. -Dutmp=false
  100. -Dresolve=false
  101. -Dtpm=false
  102. -Denvironment-d=false
  103. -Dbinfmt=false
  104. -Drepart=false
  105. -Dcoredump=false
  106. -Dpstore=false
  107. -Dlogind=false
  108. -Dmachined=false
  109. -Dportabled=false
  110. -Duserdb=false
  111. -Dnetworkd=false
  112. -Dtimesyncd=false
  113. -Dremote=false
  114. -Dnss-mymachines=false
  115. -Dnss-resolve=false
  116. -Dnss-systemd=false
  117. -Dfirstboot=false
  118. -Drandomseed=false
  119. -Dbacklight=false
  120. -Dvconsole=false
  121. -Dquotacheck=false
  122. -Dimportd=false
  123. -Dxdg-autostart=false
  124. -Drfkill=false
  125. -Dfdisk=false
  126. -Daudit=false
  127. -Dpwquality=false
  128. -Dmicrohttpd=false
  129. -Dlibcurl=false
  130. -Didn=false
  131. -Dqrencode=false
  132. -Dgnutls=false
  133. -Dopenssl=false
  134. -Dlibfido2=false
  135. -Delfutils=false
  136. -Dxkbcommon=false
  137. -Dzstd=false
  138. -Dlz4=false
  139. -Dxz=false
  140. -Dbzip2=false
  141. -Dzlib=false
  142. -Dpcre2=false
  143. -Dglib=false
  144. -Ddbus=false
  145. -Dgnu-efi=false
  146. -Dkernel-install=false
  147. -Dfuzz-tests=false
  148. -Danalyze=false
  149. -Dselinux=false
  150. -Dapparmor=false
  151. -Dsmack=false
  152. -Dinitrd=false
  153. -Dpolkit=false
  154. -Dldconfig=false
  155. -Dhibernate=false
  156. -Ddefault-llmnr=no
  157. -Drpmmacrosdir=no
  158. -Ddefault-dnssec=no
  159. -Doomd=false
  160. -Dsysext=false
  161. -Dtpm2=false
  162. -Dnscd=false
  163. -Dtranslations=false
  164. -Dfexecve=false
  165. -Dvalgrind=false
  166. -Dlog-trace=false
  167. )
  168. arch-meson "$_pkgbase-stable" build "${_meson_options[@]}"
  169. ninja -C build
  170. }
  171. check() {
  172. meson test -C build
  173. }
  174. _package() {
  175. install -d "${srcdir}"/_pkg
  176. DESTDIR=""${srcdir}"/_pkg" meson install -C build
  177. }
  178. package_xudev() {
  179. pkgdesc='Userspace device file manager'
  180. depends=('acl' 'libacl.so' 'kbd' 'kmod' 'libkmod.so' 'hwids' 'libxudev'
  181. 'util-linux' 'libblkid.so')
  182. provides=("udev=$pkgver" 'eudev')
  183. conflicts=('udev')
  184. _package
  185. install -dm0755 "${pkgdir}"/{etc,usr/{lib/pkgconfig,include,bin,share/pkgconfig}}
  186. mv -v "${srcdir}"/_pkg/etc/udev "${pkgdir}"/etc/udev
  187. mv -v "${srcdir}"/_pkg/usr/include/libudev.h "${pkgdir}"/usr/include/libudev.h
  188. mv -v "${srcdir}"/_pkg/usr/lib/pkgconfig/libudev.pc "${pkgdir}"/usr/lib/pkgconfig
  189. mv -v "${srcdir}"/_pkg/usr/lib/udev "${pkgdir}"/usr/lib/udev
  190. mv -v "${srcdir}"/_pkg/usr/bin/udevadm "${pkgdir}"/usr/bin/udevadm
  191. ln -sfv udevadm "${pkgdir}"/usr/bin/udevd
  192. #mv -v "${srcdir}"/_pkg/usr/bin/systemd-hwdb "${pkgdir}"/usr/bin/udev-hwdb
  193. mv -v "${srcdir}"/_pkg/usr/share/pkgconfig/udev.pc "${pkgdir}"/usr/share/pkgconfig
  194. rm -v "${pkgdir}"/usr/lib/udev/rules.d/99-systemd.rules
  195. # initcpio
  196. install -D -m0644 initcpio-install-udev "${pkgdir}"/usr/lib/initcpio/install/udev
  197. install -D -m0644 initcpio-hook-udev "${pkgdir}"/usr/lib/initcpio/hooks/udev
  198. # pacman hooks
  199. install -D -m0755 udev-hook "${pkgdir}"/usr/share/libalpm/scripts/udev-hook
  200. install -D -m0644 -t "${pkgdir}"/usr/share/libalpm/hooks 30-udev-{reload,hwdb}.hook
  201. }
  202. package_libxudev() {
  203. pkgdesc='udev library for enumerating and introspecting local devices'
  204. depends=('glibc')
  205. provides=('libudev.so' 'libudev' 'libeudev')
  206. conflicts=('libudev')
  207. install -dm0755 "${pkgdir}"/usr/lib
  208. mv -v "${srcdir}"/_pkg/usr/lib/libudev*.* "${pkgdir}"/usr/lib
  209. }
  210. package_etmpfiles() {
  211. pkgdesc='the tmpfiles.d binary'
  212. groups=('base-devel')
  213. depends=('libcap' 'libcap.so' 'acl' 'libacl.so')
  214. conflicts=('opentmpfiles')
  215. replaces=('opentmpfiles')
  216. install -dm0755 "${pkgdir}"/{etc,usr/{bin,lib}}
  217. mv -v "${srcdir}"/_pkg/etc/tmpfiles.d "${pkgdir}"/etc/tmpfiles.d
  218. mv -v "${srcdir}"/_pkg/usr/lib/tmpfiles.d "${pkgdir}"/usr/lib/tmpfiles.d
  219. mv -v "${srcdir}"/_pkg/usr/bin/systemd-tmpfiles.standalone "${pkgdir}"/usr/bin/tmpfiles
  220. rm -v "${pkgdir}"/usr/lib/tmpfiles.d/{*systemd*,journal*,legacy}.conf
  221. # pacman hooks
  222. install -D -m0644 -t "${pkgdir}"/usr/share/libalpm/hooks *tmpfiles.hook
  223. }
  224. package_esysusers() {
  225. pkgdesc='the sysusers.d binary'
  226. groups=('base-devel')
  227. depends=('glibc')
  228. conflicts=('opensysusers')
  229. replaces=('opensysusers')
  230. install -dm0755 "${pkgdir}"/usr/{lib,bin}
  231. mv -v "${srcdir}"/_pkg/usr/lib/sysusers.d "${pkgdir}"/usr/lib/sysusers.d
  232. mv -v "${srcdir}"/_pkg/usr/bin/systemd-sysusers.standalone "${pkgdir}"/usr/bin/sysusers
  233. rm -v "${pkgdir}"/usr/lib/sysusers.d/systemd*.conf
  234. # pacman hooks
  235. install -D -m0644 -t "${pkgdir}"/usr/share/libalpm/hooks *sysusers.hook
  236. }
  237. package_xudev-docs() {
  238. pkgdesc='Userspace device file manager (docs)'
  239. install -dm0755 "${pkgdir}"/usr/share/{doc/xudev,man/man{3,5,7,8}}
  240. mv -v "${srcdir}"/_pkg/usr/share/man/man5/udev*.5 "${pkgdir}"/usr/share/man/man5/
  241. mv -v "${srcdir}"/_pkg/usr/share/man/man7/{udev*,hwdb}.7 "${pkgdir}"/usr/share/man/man7/
  242. mv -v "${srcdir}"/_pkg/usr/share/man/man8/udev*.8 "${pkgdir}"/usr/share/man/man8/
  243. mv -v "${srcdir}"/_pkg/usr/share/man/man3/libudev* "${pkgdir}"/usr/share/man/man3/
  244. cp -v "${srcdir}"/_pkg/usr/share/doc/systemd/{LICENSE.*,NEWS} "${pkgdir}"/usr/share/doc/xudev
  245. }
  246. package_etmpfiles-docs(){
  247. pkgdesc='the tmpfiles.d binary (docs)'
  248. conflicts=('opentmpfiles-docs')
  249. replaces=('opentmpfiles-docs')
  250. install -dm0755 "${pkgdir}"/usr/share/{doc/etmpfiles,man/man5}
  251. mv -v "${srcdir}"/_pkg/usr/share/man/man5/tmpfiles.d.5 "${pkgdir}"/usr/share/man/man5/
  252. cp -v "${srcdir}"/_pkg/usr/share/doc/systemd/{LICENSE.*,NEWS} "${pkgdir}"/usr/share/doc/etmpfiles
  253. }
  254. package_esysusers-docs(){
  255. pkgdesc='the sysusers.d binary (docs)'
  256. conflicts=('opensysusers-docs')
  257. replaces=('opensysusers-docs')
  258. install -dm0755 "${pkgdir}"/usr/share/{doc/esysusers,man/man5}
  259. mv -v "${srcdir}"/_pkg/usr/share/man/man5/sysusers.d.5 "${pkgdir}"/usr/share/man/man5/
  260. cp -v "${srcdir}"/_pkg/usr/share/doc/systemd/{LICENSE.*,NEWS} "${pkgdir}"/usr/share/doc/esysusers
  261. }