blob: 226cb7ee770150dabea93b1a7cfbac3649c30bb5 [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"
Andrew Geissler595f6302022-01-24 19:11:47 +000010HOMEPAGE = "http://packages.debian.org/resolvconf"
Andrew Geissler517393d2023-01-13 08:55:19 -060011RDEPENDS:${PN} = "bash sed util-linux-flock"
Andrew Geissler595f6302022-01-24 19:11:47 +000012
13SRC_URI = "git://salsa.debian.org/debian/resolvconf.git;protocol=https;branch=unstable \
14 file://99_resolvconf \
Andrew Geissler517393d2023-01-13 08:55:19 -060015 file://0001-avoid-using-m-option-for-readlink.patch \
Andrew Geissler595f6302022-01-24 19:11:47 +000016 "
17
Patrick Williamsda295312023-12-05 16:48:56 -060018SRCREV = "86047276c80705c51859a19f0c472102e0822f34"
Andrew Geissler595f6302022-01-24 19:11:47 +000019
20S = "${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
24UPSTREAM_CHECK_URI = "${DEBIAN_MIRROR}/main/r/resolvconf/"
25
Andrew Geissler595f6302022-01-24 19:11:47 +000026do_compile () {
27 :
28}
29
30do_install () {
31 install -d ${D}${sysconfdir}/default/volatiles
32 install -m 0644 ${WORKDIR}/99_resolvconf ${D}${sysconfdir}/default/volatiles
33 if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
34 install -d ${D}${sysconfdir}/tmpfiles.d
35 echo "d /run/${BPN}/interface - - - -" \
36 > ${D}${sysconfdir}/tmpfiles.d/resolvconf.conf
37 fi
38 install -d ${D}${base_libdir}/${BPN}
39 install -d ${D}${sysconfdir}/${BPN}
Andrew Geissler517393d2023-01-13 08:55:19 -060040 install -d ${D}${nonarch_base_libdir}/${BPN}
Andrew Geissler595f6302022-01-24 19:11:47 +000041 ln -snf ${localstatedir}/run/${BPN} ${D}${sysconfdir}/${BPN}/run
42 install -d ${D}${sysconfdir} ${D}${base_sbindir}
43 install -d ${D}${mandir}/man8 ${D}${docdir}/${P}
44 cp -pPR etc/resolvconf ${D}${sysconfdir}/
45 chown -R root:root ${D}${sysconfdir}/
46 install -m 0755 bin/resolvconf ${D}${base_sbindir}/
Andrew Geissler517393d2023-01-13 08:55:19 -060047 install -m 0755 bin/normalize-resolvconf ${D}${nonarch_base_libdir}/${BPN}
Andrew Geissler595f6302022-01-24 19:11:47 +000048 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
57pkg_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
Andrew Geissler517393d2023-01-13 08:55:19 -060067FILES:${PN} += "${base_libdir}/${BPN} ${nonarch_base_libdir}/${BPN}"