enigma2: remove modem plugin and related scripts
[opendreambox.git] / meta-opendreambox / 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
7 SRC_URI = "http://roy.marples.name/downloads/${BPN}/${BP}.tar.bz2 \
8            file://000resolvconf.if-up \
9            file://000resolvconf.ppp.ip-down \
10            file://000resolvconf.ppp.ip-up \
11            file://resolvconf.conf \
12            file://resolvconf.if-down \
13            file://volatiles.99_openresolv"
14 SRC_URI[md5sum] = "76337107ff56d7450d4ed622630c5574"
15 SRC_URI[sha256sum] = "4a4cf4ef20a1ce207937fb669bbae43f9db36f6298090b5e074c80ed2fe4a996"
16
17 inherit allarch
18
19 do_configure() {
20         echo "SYSCONFDIR=${sysconfdir}" > config.mk
21         echo "SBINDIR=${base_sbindir}" >> config.mk
22         echo "LIBEXECDIR=/lib/resolvconf" >> config.mk
23         echo "VARDIR=${localstatedir}/run/resolvconf" >> config.mk
24         echo "MANDIR=${mandir}" >> config.mk
25         echo "RCDIR=${sysconfdir}/init.d" >> config.mk
26         echo "RESTARTCMD=if ${sysconfdir}/init.d/\1 status >/dev/null 2>\&1; then ${sysconfdir}/init.d/\1 restart; fi" >> config.mk
27 }
28 do_install() {
29         oe_runmake "DESTDIR=${D}" install
30         install -d ${D}${sysconfdir}
31         install -m 0644 ${WORKDIR}/resolvconf.conf ${D}${sysconfdir}/resolvconf.conf
32         install -d ${D}${sysconfdir}/default/volatiles
33         install -m 0644 ${WORKDIR}/volatiles.99_openresolv ${D}${sysconfdir}/default/volatiles/99_openresolv
34         install -d ${D}${sysconfdir}/network/if-down.d
35         install -m 0755 ${WORKDIR}/resolvconf.if-down ${D}${sysconfdir}/network/if-down.d/resolvconf
36         install -d ${D}${sysconfdir}/network/if-up.d
37         install -m 0755 ${WORKDIR}/000resolvconf.if-up ${D}${sysconfdir}/network/if-up.d/000resolvconf
38         install -d ${D}${sysconfdir}/ppp/ip-down.d
39         install -m 0755 ${WORKDIR}/000resolvconf.ppp.ip-down ${D}${sysconfdir}/ppp/ip-down.d/000resolvconf
40         install -d ${D}${sysconfdir}/ppp/ip-up.d
41         install -m 0755 ${WORKDIR}/000resolvconf.ppp.ip-up ${D}${sysconfdir}/ppp/ip-up.d/000resolvconf
42 }
43
44 RPROVIDES_${PN} = "resolvconf"
45
46 RCONFLICTS_${PN} = "resolvconf"
47
48 FILES_${PN} += "/lib/resolvconf"
49
50 pkg_postinst_${PN}() {
51 if [ -z "$D" -a -x ${sysconfdir}/init.d/populate-volatile.sh ]; then
52         ${sysconfdir}/init.d/populate-volatile.sh update
53 fi
54 }
55 pkg_postrm_${PN}() {
56 if [ -z "$D" -a -x ${sysconfdir}/init.d/populate-volatile.sh ]; then
57         ${sysconfdir}/init.d/populate-volatile.sh update
58 fi
59 }