meta-opendreambox: stop using PRINC
[opendreambox.git] / meta-opendreambox / recipes-support / ca-certificates / ca-certificates_20130119.bb
1 DESCRIPTION = "Common CA certificates"
2 HOMEPAGE = "http://packages.debian.org/sid/ca-certificates"
3 SECTION = "misc"
4 LICENSE = "GPLv2+"
5 LIC_FILES_CHKSUM = "file://debian/copyright;md5=6135800ff6d893c7904d7aad90972eb5"
6
7 SRC_URI = "${DEBIAN_MIRROR}/main/c/ca-certificates/ca-certificates_${PV}.tar.gz \
8            file://0001-update-ca-certificates-remove-c-rehash.patch"
9
10 SRC_URI[md5sum] = "1fbbec2028a33cf865b79c204aa2e626"
11 SRC_URI[sha256sum] = "fb51ec9a2c551838cc1646a0b3c9e6bea5c1bb20ff5d71c542451fac4b191c22"
12
13 inherit autotools allarch
14
15 do_install_prepend() {
16         mkdir -p ${D}/usr/share/ca-certificates
17         mkdir -p ${D}/usr/sbin
18         mkdir -p ${D}/etc/ssl/certs
19         mkdir -p ${D}/etc/ca-certificates/update.d
20 }
21
22 do_install_append() {
23         cd ${D}/usr/share/ca-certificates
24         echo "# Lines starting with # will be ignored" > ${D}/etc/ca-certificates.conf
25         echo "# Lines starting with ! will remove certificate on next update" >> ${D}/etc/ca-certificates.conf
26         echo "#" >> ${D}/etc/ca-certificates.conf
27         for crt in $(find . -type f -name '*.crt' -print)
28         do
29                 crt=$(echo $crt | sed -e 's/\.\///')
30                 echo $crt >> ${D}/etc/ca-certificates.conf
31         done
32 }
33
34 pkg_postinst_${PN} () {
35 if [ -n "$D" ] ; then
36         exit 1
37 fi
38
39 ${sbindir}/update-ca-certificates
40 }
41
42 CONFFILES_${PN} = "/etc/ca-certificates.conf"