PKGBUILD 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. # Maintainer: David P. <megver83@parabola.nu>
  2. # Contributor: Luke Shumaker <lukeshu@parabola.nu>
  3. # Contributor: artoo <artoo@artixlinux.org>
  4. # NOTE: this was originally based on the artix PKGBUILD (<= v0.2)
  5. # artix as since dropped this software in favor of 'etmpfiles' from eudev
  6. # https://gitea.artixlinux.org/artixlinux/packages/commit/e8314e156545bfaab6455f8200a253932dc0049c
  7. pkgname=opentmpfiles
  8. pkgver=0.3.1
  9. pkgrel=1
  10. pkgdesc="standalone utility for handling systemd-style tmpfiles.d settings"
  11. arch=('any')
  12. url="https://github.com/OpenRC/opentmpfiles"
  13. license=('BSD2')
  14. source=("${pkgname}-${pkgver}.tar.gz::https://github.com/OpenRC/${pkgname}/archive/${pkgver}.tar.gz"
  15. '30-opentmpfiles.hook'
  16. 'tmpfiles-hook'
  17. 'chattr-ignore-nocow.patch')
  18. sha256sums=('47d651ccda53a204463285044a9d34b1bd54d927509dac43994a9d6341be084a'
  19. '23c73b3cc20ec38e0a5166f254293c911d20ae3efec8e133f424c1a1d0703fb8'
  20. 'adbee03530006e8284ea44c5dd7eb99f6cc6c4e383c09fec36d7a22f7d486fc5'
  21. '9a753d36a536c7913a38ac9e3cc22ffce4c1214f25059a0a00152bce0043a96e')
  22. prepare()
  23. {
  24. cd "${pkgbase}-${pkgver}"
  25. # https://github.com/OpenRC/opentmpfiles/issues/2
  26. patch -Np1 < ${srcdir}/chattr-ignore-nocow.patch
  27. }
  28. package()
  29. {
  30. replaces=('opentmpfiles-systemdcompat')
  31. conflicts=('opentmpfiles-systemdcompat' 'systemd-tools')
  32. cd "${pkgbase}-${pkgver}"
  33. make bindir="/usr/bin" DESTDIR="${pkgdir}" install
  34. # pacman hooks
  35. install -Dm755 ${srcdir}/tmpfiles-hook "$pkgdir"/usr/share/libalpm/scripts/tmpfiles-hook
  36. install -Dm644 -t "$pkgdir"/usr/share/libalpm/hooks ${srcdir}/*.hook
  37. ln -snf "/usr/bin/tmpfiles" "${pkgdir}/usr/bin/systemd-tmpfiles"
  38. install -d "${pkgdir}"/etc/{conf,init}.d "${pkgdir}"/etc/runlevels/{boot,sysinit}
  39. install -m755 openrc/opentmpfiles-dev.confd "${pkgdir}"/etc/conf.d/opentmpfiles-dev
  40. install -m755 openrc/opentmpfiles-dev.initd "${pkgdir}"/etc/init.d/opentmpfiles-dev
  41. install -m755 openrc/opentmpfiles-setup.confd "${pkgdir}"/etc/conf.d/opentmpfiles-setup
  42. install -m755 openrc/opentmpfiles-setup.initd "${pkgdir}"/etc/init.d/opentmpfiles-setup
  43. ln -snf /etc/init.d/opentmpfiles-dev "${pkgdir}"/etc/runlevels/sysinit/opentmpfiles-dev
  44. ln -snf /etc/init.d/opentmpfiles-setup "${pkgdir}"/etc/runlevels/boot/opentmpfiles-setup
  45. install -dm755 "${pkgdir}/usr/share/licenses/${pkgname}"
  46. install -m644 "LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/"
  47. }