resolvconf_1.93.bb 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. SUMMARY = "name server information handler"
  2. DESCRIPTION = "Resolvconf is a framework for keeping track of the system's \
  3. information about currently available nameservers. It sets \
  4. itself up as the intermediary between programs that supply \
  5. nameserver information and programs that need nameserver \
  6. information."
  7. SECTION = "console/network"
  8. LICENSE = "GPL-2.0-or-later"
  9. LIC_FILES_CHKSUM = "file://COPYING;md5=c93c0550bd3173f4504b2cbd8991e50b"
  10. HOMEPAGE = "http://packages.debian.org/resolvconf"
  11. RDEPENDS:${PN} = "bash sed util-linux-flock"
  12. SRC_URI = "git://salsa.debian.org/debian/resolvconf.git;protocol=https;branch=unstable \
  13. file://99_resolvconf \
  14. file://0001-avoid-using-m-option-for-readlink.patch \
  15. "
  16. SRCREV = "ab766fa31f7939f6d879123236b4275320b7ff64"
  17. # the package is taken from snapshots.debian.org; that source is static and goes stale
  18. # so we check the latest upstream from a directory that does get updated
  19. UPSTREAM_CHECK_URI = "${DEBIAN_MIRROR}/main/r/resolvconf/"
  20. do_compile () {
  21. :
  22. }
  23. do_install () {
  24. install -d ${D}${sysconfdir}/default/volatiles
  25. install -m 0644 ${UNPACKDIR}/99_resolvconf ${D}${sysconfdir}/default/volatiles
  26. if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
  27. install -d ${D}${sysconfdir}/tmpfiles.d
  28. echo "d /run/${BPN}/interface - - - -" \
  29. > ${D}${sysconfdir}/tmpfiles.d/resolvconf.conf
  30. fi
  31. install -d ${D}${base_libdir}/${BPN}
  32. install -d ${D}${sysconfdir}/${BPN}
  33. install -d ${D}${nonarch_base_libdir}/${BPN}
  34. ln -snf ${localstatedir}/run/${BPN} ${D}${sysconfdir}/${BPN}/run
  35. install -d ${D}${sysconfdir} ${D}${base_sbindir}
  36. install -d ${D}${mandir}/man8 ${D}${docdir}/${P}
  37. cp -pPR etc/resolvconf ${D}${sysconfdir}/
  38. chown -R root:root ${D}${sysconfdir}/
  39. install -m 0755 bin/resolvconf ${D}${base_sbindir}/
  40. install -m 0755 bin/normalize-resolvconf ${D}${nonarch_base_libdir}/${BPN}
  41. install -m 0755 bin/list-records ${D}${base_libdir}/${BPN}
  42. install -d ${D}/${sysconfdir}/network/if-up.d
  43. install -m 0755 debian/resolvconf.000resolvconf.if-up ${D}/${sysconfdir}/network/if-up.d/000resolvconf
  44. install -d ${D}/${sysconfdir}/network/if-down.d
  45. install -m 0755 debian/resolvconf.resolvconf.if-down ${D}/${sysconfdir}/network/if-down.d/resolvconf
  46. install -m 0644 README ${D}${docdir}/${P}/
  47. install -m 0644 man/resolvconf.8 ${D}${mandir}/man8/
  48. }
  49. pkg_postinst:${PN} () {
  50. if [ -z "$D" ]; then
  51. if command -v systemd-tmpfiles >/dev/null; then
  52. systemd-tmpfiles --create ${sysconfdir}/tmpfiles.d/resolvconf.conf
  53. elif [ -e ${sysconfdir}/init.d/populate-volatile.sh ]; then
  54. ${sysconfdir}/init.d/populate-volatile.sh update
  55. fi
  56. fi
  57. }
  58. FILES:${PN} += "${base_libdir}/${BPN} ${nonarch_base_libdir}/${BPN}"