blob: 916b9f2ae4da7cc4e4ba10de59d6b077c57dea99 [file] [log] [blame]
Patrick Williamsc124f4f2015-09-15 14:41:29 -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"
12RDEPENDS_${PN} = "bash"
13
14SRC_URI = "http://snapshot.debian.org/archive/debian/20150511T214718Z/pool/main/r/${BPN}/${BPN}_${PV}.tar.xz \
15 file://fix-path-for-busybox.patch \
16 file://99_resolvconf \
17 "
18
19SRC_URI[md5sum] = "7362d766e47bfc253500f42b30330d9f"
20SRC_URI[sha256sum] = "5a6e21e8ba6822a5f93075c8c8fe7977e34780ba551af51930d0b31fdd99ab56"
21
22inherit allarch
23
24do_compile () {
25 :
26}
27
28do_install () {
29 install -d ${D}${sysconfdir}/default/volatiles
30 install -m 0644 ${WORKDIR}/99_resolvconf ${D}${sysconfdir}/default/volatiles
31 if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
32 install -d ${D}${sysconfdir}/tmpfiles.d
33 echo "d /run/${BPN}/interface - - - -" \
34 > ${D}${sysconfdir}/tmpfiles.d/resolvconf.conf
35 fi
36 install -d ${D}${base_libdir}/${BPN}
37 install -d ${D}${sysconfdir}/${BPN}
38 ln -snf ${localstatedir}/run/${BPN} ${D}${sysconfdir}/${BPN}/run
39 install -d ${D}${sysconfdir} ${D}${base_sbindir}
40 install -d ${D}${mandir}/man8 ${D}${docdir}/${P}
41 cp -pPR etc/* ${D}${sysconfdir}/
42 chown -R root:root ${D}${sysconfdir}/
43 install -m 0755 bin/resolvconf ${D}${base_sbindir}/
44 install -m 0755 bin/list-records ${D}${base_libdir}/${BPN}
45 install -d ${D}/${sysconfdir}/network/if-up.d
46 install -m 0755 debian/resolvconf.000resolvconf.if-up ${D}/${sysconfdir}/network/if-up.d/000resolvconf
47 install -d ${D}/${sysconfdir}/network/if-down.d
48 install -m 0755 debian/resolvconf.resolvconf.if-down ${D}/${sysconfdir}/network/if-down.d/resolvconf
49 install -m 0644 README ${D}${docdir}/${P}/
50 install -m 0644 man/resolvconf.8 ${D}${mandir}/man8/
51}
52
53pkg_postinst_${PN} () {
54 if [ -z "$D" ]; then
55 if command -v systemd-tmpfiles >/dev/null; then
56 systemd-tmpfiles --create ${sysconfdir}/tmpfiles.d/resolvconf.conf
57 elif [ -e ${sysconfdir}/init.d/populate-volatile.sh ]; then
58 ${sysconfdir}/init.d/populate-volatile.sh update
59 fi
60 fi
61}
62
63FILES_${PN} += "${base_libdir}/${BPN}"