blob: f57abe36195ccb91334c3ff83567dc79ec2e19f7 [file] [log] [blame]
Andrew Geissler82c905d2020-04-13 13:39:40 -05001SUMMARY = "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"
8LICENSE = "GPLv2+"
9LIC_FILES_CHKSUM = "file://COPYING;md5=c93c0550bd3173f4504b2cbd8991e50b"
10AUTHOR = "Thomas Hood"
11HOMEPAGE = "http://packages.debian.org/resolvconf"
Patrick Williams213cb262021-08-07 19:21:33 -050012RDEPENDS:${PN} = "bash"
Andrew Geissler82c905d2020-04-13 13:39:40 -050013
Andrew Geisslerd1e89492021-02-12 15:35:20 -060014SRC_URI = "git://salsa.debian.org/debian/resolvconf.git;protocol=https;branch=unstable \
Andrew Geissler82c905d2020-04-13 13:39:40 -050015 file://fix-path-for-busybox.patch \
16 file://99_resolvconf \
Andrew Geisslerd1e89492021-02-12 15:35:20 -060017 "
Andrew Geissler82c905d2020-04-13 13:39:40 -050018
Andrew Geisslerd1e89492021-02-12 15:35:20 -060019SRCREV = "1dda36d8465e335c60190c41e7185d782da1bd7b"
Andrew Geissler82c905d2020-04-13 13:39:40 -050020
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
27inherit allarch
28
29do_compile () {
30 :
31}
32
33do_install () {
34 install -d ${D}${sysconfdir}/default/volatiles
35 install -m 0644 ${WORKDIR}/99_resolvconf ${D}${sysconfdir}/default/volatiles
36 if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
37 install -d ${D}${sysconfdir}/tmpfiles.d
38 echo "d /run/${BPN}/interface - - - -" \
39 > ${D}${sysconfdir}/tmpfiles.d/resolvconf.conf
40 fi
41 install -d ${D}${base_libdir}/${BPN}
42 install -d ${D}${sysconfdir}/${BPN}
43 ln -snf ${localstatedir}/run/${BPN} ${D}${sysconfdir}/${BPN}/run
44 install -d ${D}${sysconfdir} ${D}${base_sbindir}
45 install -d ${D}${mandir}/man8 ${D}${docdir}/${P}
Andrew Geissler6ce62a22020-11-30 19:58:47 -060046 cp -pPR etc/resolvconf ${D}${sysconfdir}/
Andrew Geissler82c905d2020-04-13 13:39:40 -050047 chown -R root:root ${D}${sysconfdir}/
48 install -m 0755 bin/resolvconf ${D}${base_sbindir}/
49 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
Patrick Williams213cb262021-08-07 19:21:33 -050058pkg_postinst:${PN} () {
Andrew Geissler82c905d2020-04-13 13:39:40 -050059 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
Patrick Williams213cb262021-08-07 19:21:33 -050068FILES:${PN} += "${base_libdir}/${BPN}"