blob: 3f1b75d07dede11c9c5cfbed940ed9531d0c6d01 [file] [log] [blame]
Andrew Geissler595f6302022-01-24 19:11:47 +00001SUMMARY = "name server information handler"
2DESCRIPTION = "Resolvconf is a framework for keeping track of the system's \
3information about currently available nameservers. It sets \
4itself up as the intermediary between programs that supply \
5nameserver information and programs that need nameserver \
6information."
7SECTION = "console/network"
Andrew Geissler7e0e3c02022-02-25 20:34:39 +00008LICENSE = "GPL-2.0-or-later"
Andrew Geissler595f6302022-01-24 19:11:47 +00009LIC_FILES_CHKSUM = "file://COPYING;md5=c93c0550bd3173f4504b2cbd8991e50b"
10AUTHOR = "Thomas Hood"
11HOMEPAGE = "http://packages.debian.org/resolvconf"
Andrew Geissler517393d2023-01-13 08:55:19 -060012RDEPENDS:${PN} = "bash sed util-linux-flock"
Andrew Geissler595f6302022-01-24 19:11:47 +000013
14SRC_URI = "git://salsa.debian.org/debian/resolvconf.git;protocol=https;branch=unstable \
15 file://99_resolvconf \
Andrew Geissler517393d2023-01-13 08:55:19 -060016 file://0001-avoid-using-m-option-for-readlink.patch \
Andrew Geissler595f6302022-01-24 19:11:47 +000017 "
18
19SRCREV = "859209d573e7aec0e95d812c6b52444591a628d1"
20
21S = "${WORKDIR}/git"
22
23# the package is taken from snapshots.debian.org; that source is static and goes stale
24# so we check the latest upstream from a directory that does get updated
25UPSTREAM_CHECK_URI = "${DEBIAN_MIRROR}/main/r/resolvconf/"
26
Andrew Geissler595f6302022-01-24 19:11:47 +000027do_compile () {
28 :
29}
30
31do_install () {
32 install -d ${D}${sysconfdir}/default/volatiles
33 install -m 0644 ${WORKDIR}/99_resolvconf ${D}${sysconfdir}/default/volatiles
34 if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
35 install -d ${D}${sysconfdir}/tmpfiles.d
36 echo "d /run/${BPN}/interface - - - -" \
37 > ${D}${sysconfdir}/tmpfiles.d/resolvconf.conf
38 fi
39 install -d ${D}${base_libdir}/${BPN}
40 install -d ${D}${sysconfdir}/${BPN}
Andrew Geissler517393d2023-01-13 08:55:19 -060041 install -d ${D}${nonarch_base_libdir}/${BPN}
Andrew Geissler595f6302022-01-24 19:11:47 +000042 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}/
Andrew Geissler517393d2023-01-13 08:55:19 -060048 install -m 0755 bin/normalize-resolvconf ${D}${nonarch_base_libdir}/${BPN}
Andrew Geissler595f6302022-01-24 19:11:47 +000049 install -m 0755 bin/list-records ${D}${base_libdir}/${BPN}
50 install -d ${D}/${sysconfdir}/network/if-up.d
51 install -m 0755 debian/resolvconf.000resolvconf.if-up ${D}/${sysconfdir}/network/if-up.d/000resolvconf
52 install -d ${D}/${sysconfdir}/network/if-down.d
53 install -m 0755 debian/resolvconf.resolvconf.if-down ${D}/${sysconfdir}/network/if-down.d/resolvconf
54 install -m 0644 README ${D}${docdir}/${P}/
55 install -m 0644 man/resolvconf.8 ${D}${mandir}/man8/
56}
57
58pkg_postinst:${PN} () {
59 if [ -z "$D" ]; then
60 if command -v systemd-tmpfiles >/dev/null; then
61 systemd-tmpfiles --create ${sysconfdir}/tmpfiles.d/resolvconf.conf
62 elif [ -e ${sysconfdir}/init.d/populate-volatile.sh ]; then
63 ${sysconfdir}/init.d/populate-volatile.sh update
64 fi
65 fi
66}
67
Andrew Geissler517393d2023-01-13 08:55:19 -060068FILES:${PN} += "${base_libdir}/${BPN} ${nonarch_base_libdir}/${BPN}"