Annotation of /trunk/core/ca-certificates/ca-certificates-20180409-r1.smage2
Parent Directory | Revision Log
Revision 30813 -
(hide annotations)
(download)
Mon Apr 23 10:47:50 2018 UTC (6 years, 5 months ago) by niro
File size: 1863 byte(s)
Mon Apr 23 10:47:50 2018 UTC (6 years, 5 months ago) by niro
File size: 1863 byte(s)
auto added: ver bump to 20180409-r1
1 | niro | 30813 | # $Id$ |
2 | |||
3 | PNAME="ca-certificates" | ||
4 | PVER="20180409" | ||
5 | PBUILD="r1" | ||
6 | |||
7 | PCAT="app-crypt" | ||
8 | |||
9 | DESCRIPTION="Common CA certificates." | ||
10 | HOMEPAGE="http://packages.qa.debian.org/c/ca-certificates.html" | ||
11 | |||
12 | DEPEND=">= dev-libs/openssl-1 | ||
13 | >= app-shells/bash-4.2 | ||
14 | >= sys-apps/coreutils-8 | ||
15 | >= sys-apps/debianutils-2 | ||
16 | >= sys-apps/findutils-4.4 | ||
17 | >= virtual/sed" | ||
18 | |||
19 | SDEPEND=">= dev-lang/python-2.7" | ||
20 | |||
21 | SRCFILE="${PNAME}_${PVER}.tar.xz" | ||
22 | SRCDIR="${BUILDDIR}/${PNAME}" | ||
23 | |||
24 | # do not strip libtool files and check not supported | ||
25 | msetfeature "libtool" "!check" | ||
26 | |||
27 | sminclude mbuild mtools | ||
28 | |||
29 | SRC_URI=( | ||
30 | http://ftp.debian.org/debian/pool/main/c/${PNAME}/${SRCFILE} | ||
31 | mirror://${PNAME}/${SRCFILE} | ||
32 | ) | ||
33 | |||
34 | UP2SUBSTITUTE="certificates_" | ||
35 | UP2DATE="updatecmd 'http://ftp.debian.org/debian/pool/main/c/${PNAME}' | highesttarball xz" | ||
36 | |||
37 | src_compile() | ||
38 | { | ||
39 | cd ${SRCDIR} | ||
40 | mmake || die | ||
41 | } | ||
42 | |||
43 | src_install() | ||
44 | { | ||
45 | cd ${SRCDIR} | ||
46 | |||
47 | # create cert directory structure | ||
48 | mkeepdir /etc/ca-certificates/update.d || die | ||
49 | mkeepdir /etc/ssl/certs || die | ||
50 | minstalldir /usr/sbin || die | ||
51 | minstalldir /usr/share/ca-certificates || die | ||
52 | |||
53 | mmake DESTDIR=${BINDIR} install || die | ||
54 | |||
55 | # create certs config | ||
56 | MCONFIG="/etc/ca-certificates.conf" | ||
57 | mclearconfig | ||
58 | maddconfig "# Automatically generated by ${PKGNAME}-${PVER}-${PBUILD}" | ||
59 | maddconfig '# Do not modifiy, see update-ca-certificates man page' | ||
60 | maddconfig '#' | ||
61 | cd ${BINDIR}/usr/share/ca-certificates | ||
62 | find . -name '*.crt' | sort | cut -b3- >> ${BINDIR}/${MCONFIG} || die | ||
63 | |||
64 | # mask certs config from etc protect | ||
65 | minstalldir /etc/env.d || die | ||
66 | MCONFIG="/etc/env.d/40ca-certificates" | ||
67 | mclearconfig || die | ||
68 | maddconfig 'CONFIG_PROTECT_MASK="/etc/ca-certificates.conf"' || die | ||
69 | } | ||
70 | |||
71 | postinstall() | ||
72 | { | ||
73 | if [[ ${MROOT} = / ]] || [[ -z ${MROOT} ]] | ||
74 | then | ||
75 | update-ca-certificates --fresh | ||
76 | fi | ||
77 | } | ||
78 | |||
79 | postremove() | ||
80 | { | ||
81 | if [ ! -x ${MROOT}/usr/sbin/update-ca-certificates ] | ||
82 | then | ||
83 | rm -f ${MROOT}/etc/ssl/certs/ca-certificates.crt | ||
84 | fi | ||
85 | } |