PKGBUILD 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. # Maintainer David P. <megver83@parabola.nu>
  2. # Contributor: Omar Vega Ramos <ovruni@gnu.org.pe>
  3. # Contributor: Luke Shumaker <lukeshu@parabola.nu>
  4. # Maintainer (Artix): Chris Cromer <cromer@artixlinux.org>
  5. # Maintainer (Artix): artoo <artoo@artixlinux.org>
  6. pkgbase=opensysusers
  7. pkgname=(opensysusers opensysusers-docs)
  8. pkgver=0.5.1
  9. pkgrel=2
  10. pkgdesc="A standalone utility for handling systemd-style sysusers.d users and groups"
  11. arch=('any')
  12. url="https://gitea.artixlinux.org/artix/opensysusers"
  13. license=('BSD2')
  14. makedepends=('docbook-xsl')
  15. conflicts=('systemd-tools')
  16. source=("${pkgbase}-${pkgver}.tar.gz::https://gitea.artixlinux.org/artix/opensysusers/archive/${pkgver}.tar.gz"
  17. '20-opensysusers.hook'
  18. 'sysusers-hook')
  19. sha256sums=('e941ad0f8cb8b576d434c2880ef9374ba44f28a05a9325a55f09aab0974e3de3'
  20. '8085d3f8e7b2030cef5e0f50622121ea161a2d9d087664f0a11d36f275b24970'
  21. '4222b2496d8bb1ac9c07707e4ef1b334b8b59eb15451ea8ba0fd6e4c93e50c56')
  22. prepare(){
  23. cd "${pkgbase}"
  24. }
  25. build(){
  26. cd "${pkgbase}"
  27. make PREFIX=/usr HAVEOPENRC=yes
  28. }
  29. package_opensysusers() {
  30. depends=('pacman')
  31. replaces=('opensysusers-systemdcompat')
  32. cd "${pkgbase}"
  33. make PREFIX=/usr DESTDIR="${pkgdir}" install-shared install-default-bin install-openrc
  34. # pacman hooks
  35. install -Dm755 ${srcdir}/sysusers-hook "$pkgdir"/usr/share/libalpm/scripts/sysusers-hook
  36. install -Dm644 -t "$pkgdir"/usr/share/libalpm/hooks ${srcdir}/*.hook
  37. ln -snf "/usr/bin/sysusers" "${pkgdir}/usr/bin/systemd-sysusers"
  38. install -d "${pkgdir}"/etc/runlevels/boot
  39. ln -snf /etc/init.d/opensysusers "${pkgdir}"/etc/runlevels/boot/opensysusers
  40. }
  41. package_opensysusers-docs(){
  42. pkgdesc="Opensysusers man"
  43. depends=('opensysusers')
  44. replaces=(opensysusers-manpages)
  45. cd "${pkgbase}"
  46. make PREFIX=/usr DESTDIR="${pkgdir}" install-man
  47. }