Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 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 = "GPLv2+" |
| 9 | LIC_FILES_CHKSUM = "file://COPYING;md5=c93c0550bd3173f4504b2cbd8991e50b" |
| 10 | AUTHOR = "Thomas Hood" |
| 11 | HOMEPAGE = "http://packages.debian.org/resolvconf" |
| 12 | RDEPENDS:${PN} = "bash" |
| 13 | |
| 14 | SRC_URI = "git://salsa.debian.org/debian/resolvconf.git;protocol=https;branch=unstable \ |
| 15 | file://99_resolvconf \ |
| 16 | " |
| 17 | |
| 18 | SRCREV = "859209d573e7aec0e95d812c6b52444591a628d1" |
| 19 | |
| 20 | S = "${WORKDIR}/git" |
| 21 | |
| 22 | # the package is taken from snapshots.debian.org; that source is static and goes stale |
| 23 | # so we check the latest upstream from a directory that does get updated |
| 24 | UPSTREAM_CHECK_URI = "${DEBIAN_MIRROR}/main/r/resolvconf/" |
| 25 | |
| 26 | inherit allarch |
| 27 | |
| 28 | do_compile () { |
| 29 | : |
| 30 | } |
| 31 | |
| 32 | do_install () { |
| 33 | install -d ${D}${sysconfdir}/default/volatiles |
| 34 | install -m 0644 ${WORKDIR}/99_resolvconf ${D}${sysconfdir}/default/volatiles |
| 35 | if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then |
| 36 | install -d ${D}${sysconfdir}/tmpfiles.d |
| 37 | echo "d /run/${BPN}/interface - - - -" \ |
| 38 | > ${D}${sysconfdir}/tmpfiles.d/resolvconf.conf |
| 39 | fi |
| 40 | install -d ${D}${base_libdir}/${BPN} |
| 41 | install -d ${D}${sysconfdir}/${BPN} |
| 42 | ln -snf ${localstatedir}/run/${BPN} ${D}${sysconfdir}/${BPN}/run |
| 43 | install -d ${D}${sysconfdir} ${D}${base_sbindir} |
| 44 | install -d ${D}${mandir}/man8 ${D}${docdir}/${P} |
| 45 | cp -pPR etc/resolvconf ${D}${sysconfdir}/ |
| 46 | chown -R root:root ${D}${sysconfdir}/ |
| 47 | install -m 0755 bin/resolvconf ${D}${base_sbindir}/ |
| 48 | install -m 0755 bin/list-records ${D}${base_libdir}/${BPN} |
| 49 | install -d ${D}/${sysconfdir}/network/if-up.d |
| 50 | install -m 0755 debian/resolvconf.000resolvconf.if-up ${D}/${sysconfdir}/network/if-up.d/000resolvconf |
| 51 | install -d ${D}/${sysconfdir}/network/if-down.d |
| 52 | install -m 0755 debian/resolvconf.resolvconf.if-down ${D}/${sysconfdir}/network/if-down.d/resolvconf |
| 53 | install -m 0644 README ${D}${docdir}/${P}/ |
| 54 | install -m 0644 man/resolvconf.8 ${D}${mandir}/man8/ |
| 55 | } |
| 56 | |
| 57 | pkg_postinst:${PN} () { |
| 58 | if [ -z "$D" ]; then |
| 59 | if command -v systemd-tmpfiles >/dev/null; then |
| 60 | systemd-tmpfiles --create ${sysconfdir}/tmpfiles.d/resolvconf.conf |
| 61 | elif [ -e ${sysconfdir}/init.d/populate-volatile.sh ]; then |
| 62 | ${sysconfdir}/init.d/populate-volatile.sh update |
| 63 | fi |
| 64 | fi |
| 65 | } |
| 66 | |
| 67 | FILES:${PN} += "${base_libdir}/${BPN}" |