/[gentoo-x86]/app-misc/ca-certificates/ca-certificates-20090709.ebuild
Gentoo

Contents of /app-misc/ca-certificates/ca-certificates-20090709.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.5 - (show annotations) (download)
Tue Oct 6 03:44:56 2009 UTC (5 years ago) by jer
Branch: MAIN
Changes since 1.4: +2 -2 lines
Stable for HPPA (bug #287409).
(Portage version: 2.2_rc43/cvs/Linux i686)

1 # Copyright 1999-2009 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/app-misc/ca-certificates/ca-certificates-20090709.ebuild,v 1.4 2009/10/04 17:06:31 armin76 Exp $
4
5 inherit eutils
6
7 DESCRIPTION="Common CA Certificates PEM files"
8 HOMEPAGE="http://packages.debian.org/sid/ca-certificates"
9 SRC_URI="mirror://debian/pool/main/c/${PN}/${PN}_${PV}_all.deb"
10
11 LICENSE="MPL-1.1"
12 SLOT="0"
13 KEYWORDS="alpha ~amd64 arm hppa ia64 m68k ~mips ~ppc ppc64 s390 sh sparc x86 ~sparc-fbsd ~x86-fbsd"
14 IUSE=""
15
16 DEPEND="|| ( >=sys-apps/coreutils-6.10-r1 sys-apps/mktemp sys-freebsd/freebsd-ubin )"
17 RDEPEND="${DEPEND}
18 dev-libs/openssl
19 sys-apps/debianutils"
20
21 S=${WORKDIR}
22
23 src_unpack() {
24 unpack ${A}
25 unpack ./data.tar.gz
26 rm -f control.tar.gz data.tar.gz debian-binary
27 }
28
29 pkg_setup() {
30 # For the conversion to having it in CONFIG_PROTECT_MASK,
31 # we need to tell users about it once manually first.
32 [[ -f /etc/env.d/98ca-certificates ]] \
33 || ewarn "You should run update-ca-certificates manually after etc-update"
34 }
35
36 src_install() {
37 cp -pPR * "${D}"/ || die "installing data failed"
38
39 (
40 echo "# Automatically generated by ${CAT}/${PF}"
41 echo "# $(date -u)"
42 echo "# Do not edit."
43 cd "${D}"/usr/share/ca-certificates
44 find . -name '*.crt' | sort | cut -b3-
45 ) > "${D}"/etc/ca-certificates.conf
46
47 mv "${D}"/usr/share/doc/{ca-certificates,${PF}} || die
48 prepalldocs
49
50 echo 'CONFIG_PROTECT_MASK="/etc/ca-certificates.conf"' > 98ca-certificates
51 doenvd 98ca-certificates
52 }
53
54 pkg_postinst() {
55 if [ "${ROOT}" = "/" ] ; then
56 # However it's too overzealous when the user has custom certs in place.
57 # --fresh is to clean up dangling symlinks
58 update-ca-certificates
59 fi
60
61 local badcerts=0
62 for c in $(find -L "${ROOT}"etc/ssl/certs/ -type l) ; do
63 ewarn "Broken symlink for a certificate at $c"
64 badcerts=1
65 done
66 if [ $badcerts -eq 1 ]; then
67 ewarn "You MUST remove the above broken symlinks"
68 ewarn "Otherwise any SSL validation that use the directory may fail!"
69 ewarn "To batch-remove them, run:"
70 ewarn "find -L ${ROOT}etc/ssl/certs/ -type l -exec rm {} +"
71 fi
72 }

  ViewVC Help
Powered by ViewVC 1.1.20