Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 1 | SUMMARY = "a utility to add users/groups to the system" |
| 2 | DESCRIPTION = "adduser, addgroup - add a user or group to the system" |
| 3 | HOMEPAGE = "https://salsa.debian.org/debian/adduser" |
| 4 | SECTION = "base/utils" |
| 5 | |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 6 | LICENSE = "GPL-2.0-only" |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 7 | LIC_FILES_CHKSUM = "file://debian/copyright;md5=caed49ab166f22ef31bf1127f558d0ef" |
| 8 | |
| 9 | SRC_URI = "https://launchpad.net/debian/+archive/primary/+sourcefiles/adduser/${PV}/${BPN}_${PV}.tar.xz \ |
| 10 | file://adduser-add-M-option-for-useradd.patch \ |
Brad Bishop | e42b3e3 | 2020-01-15 22:08:42 -0500 | [diff] [blame] | 11 | file://0001-adduser-set-default-shell-with-sbin-nologin.patch \ |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 12 | " |
| 13 | |
| 14 | SRC_URI[md5sum] = "44ba2475ebdaafc9613236bdda321c97" |
| 15 | SRC_URI[sha256sum] = "3e9eea661c9aac6b2c791bfcc1de3a9c6a422d45c8f3d38ed417737ed3166ffc" |
| 16 | |
| 17 | S = "${WORKDIR}/${BPN}" |
| 18 | |
| 19 | inherit cpan-base update-alternatives |
| 20 | |
| 21 | do_install() { |
| 22 | install -d ${D}${sbindir} |
| 23 | install -m 0755 ${S}/adduser ${D}${sbindir} |
| 24 | install -m 0755 ${S}/deluser ${D}${sbindir} |
| 25 | |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 26 | install -D -m 0644 ${S}/AdduserCommon.pm ${D}${libdir}/perl5/${@get_perl_version(d)}/Debian/AdduserCommon.pm |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 27 | sed -i -e "s/VERSION/${PV}/" ${D}${sbindir}/* |
| 28 | |
| 29 | install -d ${D}/${sysconfdir} |
| 30 | install -m 0644 ${S}/*.conf ${D}/${sysconfdir} |
| 31 | |
| 32 | install -d ${D}${mandir}/man5 |
| 33 | install -m 0644 ${S}/doc/*.conf.5 ${D}${mandir}/man5 |
| 34 | install -d ${D}${mandir}/man8 |
| 35 | install -m 0644 ${S}/doc/*.8 ${D}${mandir}/man8 |
| 36 | install -d ${D}${docdir}/${BPN} |
| 37 | cp -rf ${S}/examples ${D}${docdir}/${BPN} |
| 38 | } |
| 39 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 40 | RDEPENDS:${PN} += "\ |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 41 | shadow \ |
| 42 | perl-module-getopt-long \ |
| 43 | perl-module-overloading \ |
| 44 | perl-module-file-find \ |
| 45 | perl-module-file-temp \ |
| 46 | " |
| 47 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 48 | ALTERNATIVE:${PN} = "adduser deluser addgroup delgroup" |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 49 | ALTERNATIVE_PRIORITY = "60" |
| 50 | ALTERNATIVE_LINK_NAME[adduser] = "${sbindir}/adduser" |
| 51 | ALTERNATIVE_LINK_NAME[deluser] = "${sbindir}/deluser" |
| 52 | ALTERNATIVE_LINK_NAME[addgroup] = "${sbindir}/addgroup" |
| 53 | ALTERNATIVE_LINK_NAME[delgroup] = "${sbindir}/delgroup" |
| 54 | ALTERNATIVE_TARGET[addgroup] = "${sbindir}/adduser.${BPN}" |
| 55 | ALTERNATIVE_TARGET[delgroup] = "${sbindir}/deluser.${BPN}" |