Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [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 = "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 | |
| 19 | SRC_URI[md5sum] = "7362d766e47bfc253500f42b30330d9f" |
| 20 | SRC_URI[sha256sum] = "5a6e21e8ba6822a5f93075c8c8fe7977e34780ba551af51930d0b31fdd99ab56" |
| 21 | |
| 22 | inherit allarch |
| 23 | |
| 24 | do_compile () { |
| 25 | : |
| 26 | } |
| 27 | |
| 28 | do_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 | |
| 53 | pkg_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 | |
| 63 | FILES_${PN} += "${base_libdir}/${BPN}" |