summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorCallum Parsey2023-02-19 23:10:26 +1030
committerCallum Parsey2023-02-19 23:10:26 +1030
commit766affeff62ff7f24c531a8eac600f0f5f929a27 (patch)
treed86a4473f8c1e1a57c39e40bd4dc74f598495c5a /PKGBUILD
parentae584e4338564bb3b692bf388677828d2c3bdf45 (diff)
downloadaur-766affeff62ff7f24c531a8eac600f0f5f929a27.tar.gz
Include docs and patched/translated manfiles
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD53
1 files changed, 47 insertions, 6 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 08ffa3235100..1e3136d47c80 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -15,11 +15,13 @@ url="https://salsa.debian.org/debian/adduser"
license=("GPL2")
# TODO: Aren't `shadow` and `perl` also dependencies?
depends=("gawk")
+makedepends=("po4a")
+conflicts=("adduser")
backup=("etc/adduser.conf" "etc/deluser.conf")
source=("https://salsa.debian.org/debian/adduser/-/archive/debian/${pkgver}/${_pkgname}-${pkgver}.tar.gz"
"arch-policy.patch")
sha256sums=("3ce6de32bce048d12429d9431b36d8437c1934266475b6a9f5235b3dff54f918"
- "82600db78ad765623226839061e23f34e1f199bc63c16e731dce0f00829d33f1")
+ "1cdd9db5dc7b112eb24d2527a08bfbde05fe25f239d36ac03dc0babeb0ba40c4")
# Arch's UID/GID policy differs a little from Debian's. I've included a patch
# which issues the necessary changes to both the template configuration files
@@ -38,20 +40,59 @@ prepare() {
patch -Np0 -d . -i arch-policy.patch
}
+# Translated manpages have to be generated using `po4a`.
+# TODO: Most of the translations are being rejected by `po4a` for being
+# incomplete. I believe this is an upstream problem, but am documenting it in
+# case it really is a problem with my environment.
+build() {
+ cd ${_pkgname}-${pkgver}/doc/po4a
+ po4a po4a.conf
+}
+
# TODO: Run tests, but only in isolation from main system
-# TODO: Should include `copyright` file from repository for attribution info
-# TODO: Should include manpages/`README` from repository
# TODO: What about `adduser.local`? What even is that?
# TODO: Locale/translation files should also be included
package() {
cd ${_pkgname}-${pkgver}
+ # Binaries
install -Dm755 adduser "${pkgdir}/usr/bin/adduser"
install -Dm755 deluser "${pkgdir}/usr/bin/deluser"
+ install -Dm755 AdduserCommon.pm "${pkgdir}/usr/share/perl5/vendor_perl/Debian/AdduserCommon.pm"
ln -s adduser "${pkgdir}/usr/bin/addgroup"
ln -s deluser "${pkgdir}/usr/bin/delgroup"
- install -Dm755 adduser.conf "${pkgdir}/etc/adduser.conf"
- install -Dm755 deluser.conf "${pkgdir}/etc/deluser.conf"
- install -Dm755 AdduserCommon.pm "${pkgdir}/usr/share/perl5/vendor_perl/Debian/AdduserCommon.pm"
+ # Configuration files
+ install -Dm644 adduser.conf "${pkgdir}/etc/adduser.conf"
+ install -Dm644 deluser.conf "${pkgdir}/etc/deluser.conf"
+
+ # Documentation
+ cd debian
+ install -d "${pkgdir}/usr/share/doc/adduser"
+ install -Dm644 copyright NEWS README "${pkgdir}/usr/share/doc/adduser"
+
+ # Manpages
+ # TODO: There's probably a way of doing this which is more concise and
+ # future-proofed, but probably more complicated.
+ # TODO: Some manpage directories on my system are specifically named after
+ # their locales. Is this something I should be worried about?
+ # TODO: Test in clean chroot with all necessary locales generated
+ cd ../doc
+ install -Dm644 adduser.8 "${pkgdir}/usr/share/man/man8/adduser.8"
+ install -Dm644 adduser.conf.5 "${pkgdir}/usr/share/man/man5/adduser.conf.5"
+ install -Dm644 adduser.conf.fr.5 "${pkgdir}/usr/share/man/fr/man5/adduser.conf.5"
+ install -Dm644 adduser.conf.nl.5 "${pkgdir}/usr/share/man/nl/man5/adduser.conf.5"
+ install -Dm644 adduser.conf.pt.5 "${pkgdir}/usr/share/man/pt/man5/adduser.conf.5"
+ install -Dm644 adduser.fr.8 "${pkgdir}/usr/share/man/fr/man8/adduser.8"
+ #install -Dm644 adduser.local.8 "${pkgdir}/usr/share/man/man8/adduser.local.8"
+ install -Dm644 adduser.nl.8 "${pkgdir}/usr/share/man/nl/man8/adduser.8"
+ install -Dm644 adduser.pt.8 "${pkgdir}/usr/share/man/pt/man8/adduser.8"
+ install -Dm644 deluser.8 "${pkgdir}/usr/share/man/man8/deluser.8"
+ install -Dm644 deluser.conf.5 "${pkgdir}/usr/share/man/man5/deluser.conf.5"
+ install -Dm644 deluser.conf.fr.5 "${pkgdir}/usr/share/man/fr/man5/deluser.conf.5"
+ install -Dm644 deluser.conf.nl.5 "${pkgdir}/usr/share/man/nl/man5/deluser.conf.5"
+ install -Dm644 deluser.conf.pt.5 "${pkgdir}/usr/share/man/pt/man5/deluser.conf.5"
+ install -Dm644 deluser.fr.8 "${pkgdir}/usr/share/man/fr/man8/deluser.8"
+ install -Dm644 deluser.nl.8 "${pkgdir}/usr/share/man/nl/man8/deluser.8"
+ install -Dm644 deluser.pt.8 "${pkgdir}/usr/share/man/pt/man8/deluser.8"
}