diff options
author | Callum Parsey | 2023-02-19 23:10:26 +1030 |
---|---|---|
committer | Callum Parsey | 2023-02-19 23:10:26 +1030 |
commit | 766affeff62ff7f24c531a8eac600f0f5f929a27 (patch) | |
tree | d86a4473f8c1e1a57c39e40bd4dc74f598495c5a | |
parent | ae584e4338564bb3b692bf388677828d2c3bdf45 (diff) | |
download | aur-766affeff62ff7f24c531a8eac600f0f5f929a27.tar.gz |
Include docs and patched/translated manfiles
-rw-r--r-- | PKGBUILD | 53 | ||||
-rw-r--r-- | arch-policy.patch | 33 |
2 files changed, 80 insertions, 6 deletions
@@ -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" } diff --git a/arch-policy.patch b/arch-policy.patch index 9f85489242d6..dd2124e7be9d 100644 --- a/arch-policy.patch +++ b/arch-policy.patch @@ -53,3 +53,36 @@ diff '--color=auto' -rupN adduser-debian-3.131.orig/adduser.conf adduser-debian- # Specify a file or a directory containing UID and GID pool. #UID_POOL=/etc/adduser-pool.conf +diff '--color=auto' -rupN adduser-debian-3.131.orig/doc/adduser.conf.5 adduser-debian-3.131/doc/adduser.conf.5 +--- adduser-debian-3.131.orig/doc/adduser.conf.5 2023-02-19 22:33:00.353721720 +1030 ++++ adduser-debian-3.131/doc/adduser.conf.5 2023-02-19 23:00:31.581333495 +1030 +@@ -62,17 +62,17 @@ Defaults to \fIusers\fP. + .B FIRST_SYSTEM_GID " and " LAST_SYSTEM_GID + specify an inclusive range of GIDs from which GIDs + for system groups can be dynamically allocated. +-Defaults to \fI100\fP - \fI999\fP. ++Defaults to \fI500\fP - \fI999\fP. + .TP + .B FIRST_GID " and " LAST_GID + specify an inclusive range of GIDs from which GIDs + for non-system groups can be dynamically allocated. +-Defaults to \fI1000\fP - \fI59999\fP. ++Defaults to \fI1000\fP - \fI60000\fP. + .TP + .B FIRST_SYSTEM_UID " and " LAST_SYSTEM_UID + specify an inclusive range of UIDs from which UIDs + for system users can be dynamically allocated. +-Defaults to \fI100\fP - \fI999\fP. ++Defaults to \fI500\fP - \fI999\fP. + Please note that system software, + such as the users allocated by the \fIbase-passwd\fP package, + may assume that UIDs less than 100 are unallocated. +@@ -80,7 +80,7 @@ may assume that UIDs less than 100 are u + .B FIRST_UID " and " LAST_UID + specify an inclusive range of UIDs from which UIDs + for non-system users can be dynamically allocated. +-Defaults to \fI1000\fP - \fI59999\fP. ++Defaults to \fI1000\fP - \fI60000\fP. + .TP + .B GID_POOL + See \fBUID_POOL\fP. |