PKGBUILD 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. # Maintainer: Nathan Owens <ndowens@artixlinux.org>
  2. # Contributor: Jan de Groot <jgc@archlinux.org>
  3. pkgname=polkit
  4. pkgver=121
  5. pkgrel=1
  6. pkgrel+=.nonsystemd1
  7. pkgdesc="Application development toolkit for controlling system-wide privileges"
  8. url="https://gitlab.freedesktop.org/polkit/polkit"
  9. arch=(x86_64)
  10. arch+=(i686 armv7h)
  11. license=(LGPL)
  12. depends=(glib2 pam expat elogind js78 duktape)
  13. makedepends=(meson gtk-doc gobject-introspection git)
  14. checkdepends=(python-dbusmock)
  15. provides=(libpolkit-{agent,gobject}-1.so)
  16. backup=(etc/pam.d/polkit-1)
  17. options=(debug)
  18. _commit=827b0ddac5b1ef00a47fca4526fcf057bee5f1db # tags/121
  19. source=("git+https://gitlab.freedesktop.org/polkit/polkit.git#commit=$_commit"
  20. '99-parabola.rules'
  21. meson-0.61.diff)
  22. b2sums=('SKIP'
  23. 'd320d928b5480b5b8143717e6f88101912709020efc9583fbb233a2cc11aff51d36226b94cf69104db06f330e04d4dcfd6e4c7b027df75a3c72c43adec625fb2'
  24. '29cef1cf9265ec0b70bf5a46655ee51b9855ce64e47636809b9704ca80edaf5777060d7469eea15a4126791d9290d44901726b6496acf83e41f46a96fe137ead')
  25. pkgver() {
  26. cd polkit
  27. git describe --tags | sed 's/[^-]*-g/r&/;s/-/+/g'
  28. }
  29. prepare() {
  30. cd polkit
  31. }
  32. build() {
  33. local meson_options=(
  34. -D examples=true
  35. -D gtk_doc=true
  36. -D man=true
  37. -D os_type=redhat
  38. -D session_tracking=libelogind
  39. -D tests=true
  40. -D systemdsystemunitdir=foo
  41. )
  42. arch-meson polkit build "${meson_options[@]}"
  43. meson compile -C build
  44. }
  45. check() {
  46. meson test -C build --print-errorlogs -t 3
  47. }
  48. package() {
  49. meson install -C build --destdir "$pkgdir"
  50. install -d -o root -g 102 -m 750 "$pkgdir"/{etc,usr/share}/polkit-1/rules.d
  51. mv "$pkgdir"/{etc,usr/share}/polkit-1/rules.d/50-default.rules
  52. install -Dm644 /dev/stdin "$pkgdir/usr/lib/sysusers.d/$pkgname.conf" <<END
  53. u polkitd 102 "PolicyKit daemon"
  54. m polkitd proc
  55. END
  56. install -m0644 "${srcdir}"/99-parabola.rules "${pkgdir}"/etc/polkit-1/rules.d
  57. # workaround the unit enforcement, atm can't be disabled, needs patching
  58. rm -rf "${pkgdir}"/usr/foo
  59. }
  60. # vim:set sw=2 et: