xref: /OK3568_Linux_fs/yocto/poky/meta/recipes-connectivity/resolvconf/resolvconf_1.91.bb (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593SmuzhiyunSUMMARY = "name server information handler"
2*4882a593SmuzhiyunDESCRIPTION = "Resolvconf is a framework for keeping track of the system's \
3*4882a593Smuzhiyuninformation about currently available nameservers. It sets \
4*4882a593Smuzhiyunitself up as the intermediary between programs that supply \
5*4882a593Smuzhiyunnameserver information and programs that need nameserver \
6*4882a593Smuzhiyuninformation."
7*4882a593SmuzhiyunSECTION = "console/network"
8*4882a593SmuzhiyunLICENSE = "GPL-2.0-or-later"
9*4882a593SmuzhiyunLIC_FILES_CHKSUM = "file://COPYING;md5=c93c0550bd3173f4504b2cbd8991e50b"
10*4882a593SmuzhiyunAUTHOR = "Thomas Hood"
11*4882a593SmuzhiyunHOMEPAGE = "http://packages.debian.org/resolvconf"
12*4882a593SmuzhiyunRDEPENDS:${PN} = "bash sed util-linux-flock"
13*4882a593Smuzhiyun
14*4882a593SmuzhiyunSRC_URI = "git://salsa.debian.org/debian/resolvconf.git;protocol=https;branch=unstable \
15*4882a593Smuzhiyun           file://99_resolvconf \
16*4882a593Smuzhiyun           file://0001-avoid-using-m-option-for-readlink.patch \
17*4882a593Smuzhiyun           "
18*4882a593Smuzhiyun
19*4882a593SmuzhiyunSRCREV = "859209d573e7aec0e95d812c6b52444591a628d1"
20*4882a593Smuzhiyun
21*4882a593SmuzhiyunS = "${WORKDIR}/git"
22*4882a593Smuzhiyun
23*4882a593Smuzhiyun# the package is taken from snapshots.debian.org; that source is static and goes stale
24*4882a593Smuzhiyun# so we check the latest upstream from a directory that does get updated
25*4882a593SmuzhiyunUPSTREAM_CHECK_URI = "${DEBIAN_MIRROR}/main/r/resolvconf/"
26*4882a593Smuzhiyun
27*4882a593Smuzhiyundo_compile () {
28*4882a593Smuzhiyun	:
29*4882a593Smuzhiyun}
30*4882a593Smuzhiyun
31*4882a593Smuzhiyundo_install () {
32*4882a593Smuzhiyun	install -d ${D}${sysconfdir}/default/volatiles
33*4882a593Smuzhiyun	install -m 0644 ${WORKDIR}/99_resolvconf ${D}${sysconfdir}/default/volatiles
34*4882a593Smuzhiyun	if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
35*4882a593Smuzhiyun		install -d ${D}${sysconfdir}/tmpfiles.d
36*4882a593Smuzhiyun		echo "d /run/${BPN}/interface - - - -" \
37*4882a593Smuzhiyun		     > ${D}${sysconfdir}/tmpfiles.d/resolvconf.conf
38*4882a593Smuzhiyun	fi
39*4882a593Smuzhiyun	install -d ${D}${base_libdir}/${BPN}
40*4882a593Smuzhiyun	install -d ${D}${sysconfdir}/${BPN}
41*4882a593Smuzhiyun	install -d ${D}${nonarch_base_libdir}/${BPN}
42*4882a593Smuzhiyun	ln -snf ${localstatedir}/run/${BPN} ${D}${sysconfdir}/${BPN}/run
43*4882a593Smuzhiyun	install -d ${D}${sysconfdir} ${D}${base_sbindir}
44*4882a593Smuzhiyun	install -d ${D}${mandir}/man8 ${D}${docdir}/${P}
45*4882a593Smuzhiyun	cp -pPR etc/resolvconf ${D}${sysconfdir}/
46*4882a593Smuzhiyun	chown -R root:root ${D}${sysconfdir}/
47*4882a593Smuzhiyun	install -m 0755 bin/resolvconf ${D}${base_sbindir}/
48*4882a593Smuzhiyun	install -m 0755 bin/normalize-resolvconf ${D}${nonarch_base_libdir}/${BPN}
49*4882a593Smuzhiyun	install -m 0755 bin/list-records ${D}${base_libdir}/${BPN}
50*4882a593Smuzhiyun	install -d ${D}/${sysconfdir}/network/if-up.d
51*4882a593Smuzhiyun	install -m 0755 debian/resolvconf.000resolvconf.if-up ${D}/${sysconfdir}/network/if-up.d/000resolvconf
52*4882a593Smuzhiyun	install -d ${D}/${sysconfdir}/network/if-down.d
53*4882a593Smuzhiyun	install -m 0755 debian/resolvconf.resolvconf.if-down ${D}/${sysconfdir}/network/if-down.d/resolvconf
54*4882a593Smuzhiyun	install -m 0644 README ${D}${docdir}/${P}/
55*4882a593Smuzhiyun	install -m 0644 man/resolvconf.8 ${D}${mandir}/man8/
56*4882a593Smuzhiyun}
57*4882a593Smuzhiyun
58*4882a593Smuzhiyunpkg_postinst:${PN} () {
59*4882a593Smuzhiyun	if [ -z "$D" ]; then
60*4882a593Smuzhiyun		if command -v systemd-tmpfiles >/dev/null; then
61*4882a593Smuzhiyun			systemd-tmpfiles --create ${sysconfdir}/tmpfiles.d/resolvconf.conf
62*4882a593Smuzhiyun		elif [ -e ${sysconfdir}/init.d/populate-volatile.sh ]; then
63*4882a593Smuzhiyun			${sysconfdir}/init.d/populate-volatile.sh update
64*4882a593Smuzhiyun		fi
65*4882a593Smuzhiyun	fi
66*4882a593Smuzhiyun}
67*4882a593Smuzhiyun
68*4882a593SmuzhiyunFILES:${PN} += "${base_libdir}/${BPN} ${nonarch_base_libdir}/${BPN}"
69