Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 1 | SUMMARY = "Common CA certificates" |
| 2 | DESCRIPTION = "This package includes PEM files of CA certificates to allow \ |
| 3 | SSL-based applications to check for the authenticity of SSL connections. \ |
| 4 | This derived from Debian's CA Certificates." |
| 5 | HOMEPAGE = "http://packages.debian.org/sid/ca-certificates" |
| 6 | SECTION = "misc" |
| 7 | LICENSE = "GPL-2.0+ & MPL-2.0" |
| 8 | LIC_FILES_CHKSUM = "file://debian/copyright;md5=e7358b9541ccf3029e9705ed8de57968" |
| 9 | |
| 10 | # This is needed to ensure we can run the postinst at image creation time |
| 11 | DEPENDS = "ca-certificates-native" |
| 12 | DEPENDS_class-native = "" |
| 13 | |
| 14 | SRCREV = "f54715702c5c0581c9461f78fd84e2c8d2ec243c" |
| 15 | |
| 16 | SRC_URI = "git://anonscm.debian.org/collab-maint/ca-certificates.git \ |
| 17 | file://0001-update-ca-certificates-remove-c-rehash.patch \ |
| 18 | file://0002-update-ca-certificates-use-SYSROOT.patch \ |
| 19 | file://0001-update-ca-certificates-don-t-use-Debianisms-in-run-p.patch \ |
| 20 | file://update-ca-certificates-support-Toybox.patch \ |
| 21 | file://default-sysroot.patch \ |
| 22 | file://sbindir.patch" |
| 23 | |
| 24 | S = "${WORKDIR}/git" |
| 25 | |
| 26 | inherit allarch |
| 27 | |
| 28 | EXTRA_OEMAKE = "\ |
| 29 | 'CERTSDIR=${datadir}/ca-certificates' \ |
| 30 | 'SBINDIR=${sbindir}' \ |
| 31 | " |
| 32 | |
| 33 | do_compile_prepend() { |
| 34 | oe_runmake clean |
| 35 | } |
| 36 | |
| 37 | do_install () { |
| 38 | install -d ${D}${datadir}/ca-certificates \ |
| 39 | ${D}${sysconfdir}/ssl/certs \ |
| 40 | ${D}${sysconfdir}/ca-certificates/update.d |
| 41 | oe_runmake 'DESTDIR=${D}' install |
| 42 | |
| 43 | install -d ${D}${mandir}/man8 |
| 44 | install -m 0644 sbin/update-ca-certificates.8 ${D}${mandir}/man8/ |
| 45 | |
| 46 | install -d ${D}${sysconfdir} |
| 47 | { |
| 48 | echo "# Lines starting with # will be ignored" |
| 49 | echo "# Lines starting with ! will remove certificate on next update" |
| 50 | echo "#" |
| 51 | find ${D}${datadir}/ca-certificates -type f -name '*.crt' | \ |
| 52 | sed 's,^${D}${datadir}/ca-certificates/,,' |
| 53 | } >${D}${sysconfdir}/ca-certificates.conf |
| 54 | } |
| 55 | |
| 56 | do_install_append_class-target () { |
| 57 | sed -i -e 's,/etc/,${sysconfdir}/,' \ |
| 58 | -e 's,/usr/share/,${datadir}/,' \ |
| 59 | -e 's,/usr/local,${prefix}/local,' \ |
| 60 | ${D}${sbindir}/update-ca-certificates \ |
| 61 | ${D}${mandir}/man8/update-ca-certificates.8 |
| 62 | } |
| 63 | |
| 64 | pkg_postinst_${PN} () { |
| 65 | SYSROOT="$D" update-ca-certificates |
| 66 | } |
| 67 | |
| 68 | CONFFILES_${PN} += "${sysconfdir}/ca-certificates.conf" |
| 69 | |
| 70 | # Postinsts don't seem to be run for nativesdk packages when populating SDKs. |
| 71 | CONFFILES_${PN}_append_class-nativesdk = " ${sysconfdir}/ssl/certs/ca-certificates.crt" |
| 72 | do_install_append_class-nativesdk () { |
| 73 | SYSROOT="${D}${SDKPATHNATIVE}" update-ca-certificates |
| 74 | } |
| 75 | |
| 76 | do_install_append_class-native () { |
| 77 | SYSROOT="${D}${base_prefix}" ${D}${sbindir}/update-ca-certificates |
| 78 | } |
| 79 | |
| 80 | BBCLASSEXTEND += "native nativesdk" |