[dvbapp] use AUTOREV.
[vuplus_openvuplus_3.0] / meta-openvuplus / recipes-connectivity / openresolv / openresolv_3.5.2.bb
1 SUMMARY = "management framework for resolv.conf"
2 AUTHOR = "Roy Marples <roy@marples.name>"
3 HOMEPAGE = "http://roy.marples.name/projects/openresolv"
4 LICENSE = "BSD-2-Clause"
5 LIC_FILES_CHKSUM = "file://resolvconf.in;beginline=4;endline=26;md5=e962049f535f7385f0f2a0ac9638cd43"
6 PR = "r0"
7
8 SRC_URI = "http://roy.marples.name/downloads/${BPN}/${BP}.tar.bz2 \
9            file://000resolvconf.if-up \
10            file://000resolvconf.ppp.ip-down \
11            file://000resolvconf.ppp.ip-up \
12            file://resolvconf.conf \
13            file://resolvconf.if-down \
14            file://volatiles.99_openresolv"
15 SRC_URI[md5sum] = "76337107ff56d7450d4ed622630c5574"
16 SRC_URI[sha256sum] = "4a4cf4ef20a1ce207937fb669bbae43f9db36f6298090b5e074c80ed2fe4a996"
17
18 inherit allarch
19
20 do_configure() {
21         echo "SYSCONFDIR=${sysconfdir}" > config.mk
22         echo "SBINDIR=${base_sbindir}" >> config.mk
23         echo "LIBEXECDIR=/lib/resolvconf" >> config.mk
24         echo "VARDIR=${localstatedir}/run/resolvconf" >> config.mk
25         echo "MANDIR=${mandir}" >> config.mk
26         echo "RCDIR=${sysconfdir}/init.d" >> config.mk
27         echo "RESTARTCMD=if ${sysconfdir}/init.d/\1 status >/dev/null 2>\&1; then ${sysconfdir}/init.d/\1 restart; fi" >> config.mk
28 }
29 do_install() {
30         oe_runmake "DESTDIR=${D}" install
31         install -d ${D}${sysconfdir}
32         install -m 0644 ${WORKDIR}/resolvconf.conf ${D}${sysconfdir}/resolvconf.conf
33         install -d ${D}${sysconfdir}/default/volatiles
34         install -m 0644 ${WORKDIR}/volatiles.99_openresolv ${D}${sysconfdir}/default/volatiles/99_openresolv
35         install -d ${D}${sysconfdir}/network/if-down.d
36         install -m 0755 ${WORKDIR}/resolvconf.if-down ${D}${sysconfdir}/network/if-down.d/resolvconf
37         install -d ${D}${sysconfdir}/network/if-up.d
38         install -m 0755 ${WORKDIR}/000resolvconf.if-up ${D}${sysconfdir}/network/if-up.d/000resolvconf
39         install -d ${D}${sysconfdir}/ppp/ip-down.d
40         install -m 0755 ${WORKDIR}/000resolvconf.ppp.ip-down ${D}${sysconfdir}/ppp/ip-down.d/000resolvconf
41         install -d ${D}${sysconfdir}/ppp/ip-up.d
42         install -m 0755 ${WORKDIR}/000resolvconf.ppp.ip-up ${D}${sysconfdir}/ppp/ip-up.d/000resolvconf
43 }
44
45 RPROVIDES_${PN} = "resolvconf"
46
47 RCONFLICTS_${PN} = "resolvconf"
48
49 FILES_${PN} += "/lib/resolvconf"
50
51 pkg_postinst_${PN}() {
52 if [ -z "$D" -a -x ${sysconfdir}/init.d/populate-volatile.sh ]; then
53         ${sysconfdir}/init.d/populate-volatile.sh update
54 fi
55 }
56 pkg_postrm_${PN}() {
57 if [ -z "$D" -a -x ${sysconfdir}/init.d/populate-volatile.sh ]; then
58         ${sysconfdir}/init.d/populate-volatile.sh update
59 fi
60 }