enigma2: 4.3.2r14
[opendreambox.git] / meta-opendreambox / recipes-core / distro-feed-configs / distro-feed-configs-deb_2.0.bb
1 PKGTYPE = "deb"
2 PKGCONFDIR = "${sysconfdir}/apt/sources.list.d"
3 PKGCONFSUFFIX = "list"
4
5 SRC_URI = "file://apt.conf \
6            file://tmpfiles.conf"
7
8 do_compile() {
9     for feed in ${FEED_ARCHS}; do
10         echo "deb ${DISTRO_FEED_URI}/${PKGTYPE}/$feed ./" > ${S}${PKGCONFDIR}/$feed-feed.${PKGCONFSUFFIX}
11     done
12 }
13
14 do_install_append() {
15     install -d ${D}${sysconfdir}/apt/apt.conf.d
16     install -m 644 ${WORKDIR}/apt.conf ${D}${sysconfdir}/apt/apt.conf.d/${BPN}.conf
17     install -d ${D}${sysconfdir}/tmpfiles.d
18     install -m 644 ${WORKDIR}/tmpfiles.conf ${D}${sysconfdir}/tmpfiles.d/${BPN}.conf
19 }
20
21 pkg_postinst_${PN} () {
22     if [ -z "$D" ]; then
23         if command -v systemd-tmpfiles >/dev/null; then
24             systemd-tmpfiles --create ${sysconfdir}/tmpfiles.d/${BPN}.conf
25         elif [ -e ${sysconfdir}/init.d/populate-volatile.sh ]; then
26             ${sysconfdir}/init.d/populate-volatile.sh update
27         fi
28     fi
29 }
30
31 require distro-feed-configs.inc