Contents of /smage/branches/alx08x-unstable/core/ca-certificates/ca-certificates-20230311-r3.smage2
Parent Directory | Revision Log
Revision 17792 -
(show annotations)
(download)
Thu Dec 21 10:39:15 2023 UTC (5 months, 4 weeks ago) by niro
File size: 2311 byte(s)
Thu Dec 21 10:39:15 2023 UTC (5 months, 4 weeks ago) by niro
File size: 2311 byte(s)
-release branches/alx08x-unstable
1 | # $Id$ |
2 | |
3 | PNAME="ca-certificates" |
4 | PVER="20230311" |
5 | PBUILD="r3" |
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-5 |
14 | >= sys-apps/coreutils-8 |
15 | >= virtual/debianutils |
16 | >= sys-apps/findutils-4 |
17 | >= virtual/sed" |
18 | |
19 | SDEPEND=">= dev-lang/python3-3.11 |
20 | >= dev-python/python3-cryptography-41" |
21 | |
22 | SRCFILE="${PNAME}_${PVER}.tar.xz" |
23 | SRCDIR="${BUILDDIR}/${PNAME}" |
24 | |
25 | # do not strip libtool files and check not supported |
26 | msetfeature "libtool" "!check" |
27 | |
28 | sminclude mbuild mtools alx |
29 | |
30 | SRC_URI+=( |
31 | http://ftp.debian.org/debian/pool/main/c/${PNAME}/${SRCFILE} |
32 | mirror://${PNAME}/${SRCFILE} |
33 | ) |
34 | |
35 | UP2SUBSTITUTE="certificates_" |
36 | UP2DATE="updatecmd 'http://ftp.debian.org/debian/pool/main/c/${PNAME}' | highesttarball xz" |
37 | |
38 | src_prepare() |
39 | { |
40 | munpack ${SRCFILE} || die |
41 | cd ${SRCDIR} |
42 | |
43 | # change local cert store to /usr/share/ca-certificates/local |
44 | sed -i 's:^\(LOCALCERTSDIR=\).*:\1/usr/share/ca-certificates/local:' sbin/update-ca-certificates || die |
45 | } |
46 | |
47 | src_compile() |
48 | { |
49 | cd ${SRCDIR} |
50 | mmake || die |
51 | } |
52 | |
53 | src_install() |
54 | { |
55 | cd ${SRCDIR} |
56 | |
57 | # create cert directory structure |
58 | mkeepdir /etc/ca-certificates/update.d || die |
59 | mkeepdir /etc/ssl/certs || die |
60 | minstalldir /usr/sbin || die |
61 | minstalldir /usr/share/ca-certificates || die |
62 | # create our local store too |
63 | mkeepdir /usr/share/ca-certificates/local || die |
64 | |
65 | mmake DESTDIR=${BINDIR} install || die |
66 | |
67 | # create certs config |
68 | MCONFIG="/etc/ca-certificates.conf" |
69 | mclearconfig |
70 | maddconfig "# Automatically generated by ${PKGNAME}-${PVER}-${PBUILD}" |
71 | maddconfig '# Do not modifiy, see update-ca-certificates man page' |
72 | maddconfig '#' |
73 | cd ${BINDIR}/usr/share/ca-certificates |
74 | find . -name '*.crt' | sort | cut -b3- >> ${BINDIR}/${MCONFIG} || die |
75 | |
76 | # mask certs config from etc protect |
77 | minstalldir /etc/env.d || die |
78 | MCONFIG="/etc/env.d/40ca-certificates" |
79 | mclearconfig || die |
80 | maddconfig 'CONFIG_PROTECT_MASK="/etc/ca-certificates.conf"' || die |
81 | |
82 | # inject our root-ca |
83 | mcinjectfile ESA-CA_ROOT_BASE64.crt /usr/share/ca-certificates/local || die |
84 | } |
85 | |
86 | postinstall() |
87 | { |
88 | if [[ ${MROOT} = / ]] || [[ -z ${MROOT} ]] |
89 | then |
90 | update-ca-certificates --fresh |
91 | fi |
92 | } |
93 | |
94 | postremove() |
95 | { |
96 | if [ ! -x ${MROOT}/usr/sbin/update-ca-certificates ] |
97 | then |
98 | rm -f ${MROOT}/etc/ssl/certs/ca-certificates.crt |
99 | fi |
100 | } |