Magellan Linux

Contents of /branches/magellan-next/core/ca-certificates/ca-certificates-20111211-r1.smage2

Parent Directory Parent Directory | Revision Log Revision Log


Revision 9794 - (show annotations) (download)
Wed Jan 11 19:36:10 2012 UTC (12 years, 4 months ago) by niro
File size: 1668 byte(s)
-added pre/postinstall
1 # $Id$
2
3 PNAME="ca-certificates"
4 PVER="20111211"
5 PBUILD="r1"
6
7 PCATEGORIE="dev-util"
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 >= sys-apps/sed-4"
18
19 SDEPEND=">= dev-lang/python-2.7"
20
21 SRCFILE="${PNAME}_${PVER}.tar.gz"
22 SRCDIR="${BUILDDIR}/${PNAME}-${PVER}"
23
24 # do not strip libtool files
25 msetfeature "libtool"
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 UP2DATE="updatecmd 'http://ftp.debian.org/debian/pool/main/c/${PNAME}?C=M;O=A' | lasttarball gz"
35
36 src_compile()
37 {
38 cd ${SRCDIR}
39 mmake || die
40 }
41
42 src_install()
43 {
44 cd ${SRCDIR}
45
46 # create cert directory structure
47 minstalldir /etc/ca-certificates/update.d || die
48 minstalldir /etc/ssl/certs || die
49 minstalldir /usr/sbin || die
50 minstalldir /usr/share/ca-certificates || die
51
52 mmake DESTDIR=${BINDIR} install || die
53
54 # create certs config
55 MCONFIG="/etc/ca-certificates.conf"
56 mclearconfig
57 maddconfig "# Automatically generated by ${PKGNAME}-${PVER}-${PBUILD}"
58 maddconfig '# Do not modifiy, see update-ca-certificates man page'
59 maddconfig '#'
60 cd ${BINDIR}/usr/share/ca-certificates
61 find . -name '*.crt' | sort | cut -b3- >> ${BINDIR}/${MCONFIG} || die
62 }
63
64 postinstall()
65 {
66 if [[ ${MROOT} = / ]] || [[ -z ${MROOT} ]]
67 then
68 update-ca-certificates --fresh
69 fi
70 }
71
72 postremove()
73 {
74 if [[ ${MROOT} = / ]] || [[ -z ${MROOT} ]]
75 then
76 if [ ! -x /usr/sbin/update-ca-certificates ]
77 then
78 rm -f etc/ssl/certs/ca-certificates.crt
79 fi
80 fi
81 }