diff options
Diffstat (limited to 'meta/recipes-support/ca-certificates/ca-certificates_20160104.bb')
-rw-r--r-- | meta/recipes-support/ca-certificates/ca-certificates_20160104.bb | 79 |
1 files changed, 79 insertions, 0 deletions
diff --git a/meta/recipes-support/ca-certificates/ca-certificates_20160104.bb b/meta/recipes-support/ca-certificates/ca-certificates_20160104.bb new file mode 100644 index 0000000000..4266926033 --- /dev/null +++ b/meta/recipes-support/ca-certificates/ca-certificates_20160104.bb | |||
@@ -0,0 +1,79 @@ | |||
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://default-sysroot.patch \ | ||
21 | file://sbindir.patch" | ||
22 | |||
23 | S = "${WORKDIR}/git" | ||
24 | |||
25 | inherit allarch | ||
26 | |||
27 | EXTRA_OEMAKE = "\ | ||
28 | 'CERTSDIR=${datadir}/ca-certificates' \ | ||
29 | 'SBINDIR=${sbindir}' \ | ||
30 | " | ||
31 | |||
32 | do_compile_prepend() { | ||
33 | oe_runmake clean | ||
34 | } | ||
35 | |||
36 | do_install () { | ||
37 | install -d ${D}${datadir}/ca-certificates \ | ||
38 | ${D}${sysconfdir}/ssl/certs \ | ||
39 | ${D}${sysconfdir}/ca-certificates/update.d | ||
40 | oe_runmake 'DESTDIR=${D}' install | ||
41 | |||
42 | install -d ${D}${mandir}/man8 | ||
43 | install -m 0644 sbin/update-ca-certificates.8 ${D}${mandir}/man8/ | ||
44 | |||
45 | install -d ${D}${sysconfdir} | ||
46 | { | ||
47 | echo "# Lines starting with # will be ignored" | ||
48 | echo "# Lines starting with ! will remove certificate on next update" | ||
49 | echo "#" | ||
50 | find ${D}${datadir}/ca-certificates -type f -name '*.crt' | \ | ||
51 | sed 's,^${D}${datadir}/ca-certificates/,,' | ||
52 | } >${D}${sysconfdir}/ca-certificates.conf | ||
53 | } | ||
54 | |||
55 | do_install_append_class-target () { | ||
56 | sed -i -e 's,/etc/,${sysconfdir}/,' \ | ||
57 | -e 's,/usr/share/,${datadir}/,' \ | ||
58 | -e 's,/usr/local,${prefix}/local,' \ | ||
59 | ${D}${sbindir}/update-ca-certificates \ | ||
60 | ${D}${mandir}/man8/update-ca-certificates.8 | ||
61 | } | ||
62 | |||
63 | pkg_postinst_${PN} () { | ||
64 | SYSROOT="$D" update-ca-certificates | ||
65 | } | ||
66 | |||
67 | CONFFILES_${PN} += "${sysconfdir}/ca-certificates.conf" | ||
68 | |||
69 | # Postinsts don't seem to be run for nativesdk packages when populating SDKs. | ||
70 | CONFFILES_${PN}_append_class-nativesdk = " ${sysconfdir}/ssl/certs/ca-certificates.crt" | ||
71 | do_install_append_class-nativesdk () { | ||
72 | SYSROOT="${D}${SDKPATHNATIVE}" update-ca-certificates | ||
73 | } | ||
74 | |||
75 | do_install_append_class-native () { | ||
76 | SYSROOT="${D}${base_prefix}" ${D}${sbindir}/update-ca-certificates | ||
77 | } | ||
78 | |||
79 | BBCLASSEXTEND += "native nativesdk" | ||