Annotation of /trunk/core/ca-certificates/ca-certificates-20230311-r1.smage2
Parent Directory | Revision Log
Revision 33582 -
(hide annotations)
(download)
Mon Aug 7 11:48:29 2023 UTC (9 months, 4 weeks ago) by niro
File size: 1900 byte(s)
Mon Aug 7 11:48:29 2023 UTC (9 months, 4 weeks ago) by niro
File size: 1900 byte(s)
-20230311-r1
1 | niro | 33582 | # $Id$ |
2 | |||
3 | PNAME="ca-certificates" | ||
4 | PVER="20230311" | ||
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-5 | ||
14 | >= sys-apps/coreutils-8 | ||
15 | >= sys-apps/debianutils-5 | ||
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 | ||
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_compile() | ||
39 | { | ||
40 | cd ${SRCDIR} | ||
41 | mmake || die | ||
42 | } | ||
43 | |||
44 | src_install() | ||
45 | { | ||
46 | cd ${SRCDIR} | ||
47 | |||
48 | # create cert directory structure | ||
49 | mkeepdir /etc/ca-certificates/update.d || die | ||
50 | mkeepdir /etc/ssl/certs || die | ||
51 | minstalldir /usr/sbin || die | ||
52 | minstalldir /usr/share/ca-certificates || die | ||
53 | |||
54 | mmake DESTDIR=${BINDIR} install || die | ||
55 | |||
56 | # create certs config | ||
57 | MCONFIG="/etc/ca-certificates.conf" | ||
58 | mclearconfig | ||
59 | maddconfig "# Automatically generated by ${PKGNAME}-${PVER}-${PBUILD}" | ||
60 | maddconfig '# Do not modifiy, see update-ca-certificates man page' | ||
61 | maddconfig '#' | ||
62 | cd ${BINDIR}/usr/share/ca-certificates | ||
63 | find . -name '*.crt' | sort | cut -b3- >> ${BINDIR}/${MCONFIG} || die | ||
64 | |||
65 | # mask certs config from etc protect | ||
66 | minstalldir /etc/env.d || die | ||
67 | MCONFIG="/etc/env.d/40ca-certificates" | ||
68 | mclearconfig || die | ||
69 | maddconfig 'CONFIG_PROTECT_MASK="/etc/ca-certificates.conf"' || die | ||
70 | } | ||
71 | |||
72 | postinstall() | ||
73 | { | ||
74 | if [[ ${MROOT} = / ]] || [[ -z ${MROOT} ]] | ||
75 | then | ||
76 | update-ca-certificates --fresh | ||
77 | fi | ||
78 | } | ||
79 | |||
80 | postremove() | ||
81 | { | ||
82 | if [ ! -x ${MROOT}/usr/sbin/update-ca-certificates ] | ||
83 | then | ||
84 | rm -f ${MROOT}/etc/ssl/certs/ca-certificates.crt | ||
85 | fi | ||
86 | } |