adduser_3.118.bb 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  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. LICENSE = "GPLv2"
  6. LIC_FILES_CHKSUM = "file://debian/copyright;md5=caed49ab166f22ef31bf1127f558d0ef"
  7. SRC_URI = "https://launchpad.net/debian/+archive/primary/+sourcefiles/adduser/${PV}/${BPN}_${PV}.tar.xz \
  8. file://adduser-add-M-option-for-useradd.patch \
  9. file://0001-adduser-set-default-shell-with-sbin-nologin.patch \
  10. "
  11. SRC_URI[md5sum] = "44ba2475ebdaafc9613236bdda321c97"
  12. SRC_URI[sha256sum] = "3e9eea661c9aac6b2c791bfcc1de3a9c6a422d45c8f3d38ed417737ed3166ffc"
  13. S = "${WORKDIR}/${BPN}"
  14. inherit cpan-base update-alternatives
  15. do_install() {
  16. install -d ${D}${sbindir}
  17. install -m 0755 ${S}/adduser ${D}${sbindir}
  18. install -m 0755 ${S}/deluser ${D}${sbindir}
  19. install -D -m 0644 ${S}/AdduserCommon.pm ${D}${libdir}/perl5/${@get_perl_version(d)}/Debian/AdduserCommon.pm
  20. sed -i -e "s/VERSION/${PV}/" ${D}${sbindir}/*
  21. install -d ${D}/${sysconfdir}
  22. install -m 0644 ${S}/*.conf ${D}/${sysconfdir}
  23. install -d ${D}${mandir}/man5
  24. install -m 0644 ${S}/doc/*.conf.5 ${D}${mandir}/man5
  25. install -d ${D}${mandir}/man8
  26. install -m 0644 ${S}/doc/*.8 ${D}${mandir}/man8
  27. install -d ${D}${docdir}/${BPN}
  28. cp -rf ${S}/examples ${D}${docdir}/${BPN}
  29. }
  30. RDEPENDS_${PN} += "\
  31. shadow \
  32. perl-module-getopt-long \
  33. perl-module-overloading \
  34. perl-module-file-find \
  35. perl-module-file-temp \
  36. "
  37. ALTERNATIVE_${PN} = "adduser deluser addgroup delgroup"
  38. ALTERNATIVE_PRIORITY = "60"
  39. ALTERNATIVE_LINK_NAME[adduser] = "${sbindir}/adduser"
  40. ALTERNATIVE_LINK_NAME[deluser] = "${sbindir}/deluser"
  41. ALTERNATIVE_LINK_NAME[addgroup] = "${sbindir}/addgroup"
  42. ALTERNATIVE_LINK_NAME[delgroup] = "${sbindir}/delgroup"
  43. ALTERNATIVE_TARGET[addgroup] = "${sbindir}/adduser.${BPN}"
  44. ALTERNATIVE_TARGET[delgroup] = "${sbindir}/deluser.${BPN}"