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

Contents of /app-misc/ca-certificates/ca-certificates-20110502-r3.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (hide annotations) (download)
Wed Sep 7 00:39:11 2011 UTC (7 years, 3 months ago) by vapier
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +6 -4 lines
Remove old mktemp depends, and move deb2targz to DEPEND since it is only needed to unpack the pkg.

(Portage version: 2.2.0_alpha51/cvs/Linux x86_64)

1 grobian 1.1 # Copyright 1999-2011 Gentoo Foundation
2     # Distributed under the terms of the GNU General Public License v2
3 vapier 1.2 # $Header: /var/cvsroot/gentoo-x86/app-misc/ca-certificates/ca-certificates-20110502-r3.ebuild,v 1.1 2011/09/05 19:56:46 grobian Exp $
4 grobian 1.1
5     EAPI="3"
6    
7     inherit eutils
8    
9     DESCRIPTION="Common CA Certificates PEM files"
10     HOMEPAGE="http://packages.debian.org/sid/ca-certificates"
11     SRC_URI="mirror://debian/pool/main/c/${PN}/${PN}_${PV}+nmu1_all.deb"
12    
13     LICENSE="MPL-1.1"
14     SLOT="0"
15     KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~sparc-fbsd ~x86-fbsd ~x64-freebsd ~x86-freebsd ~hppa-hpux ~ia64-hpux ~x86-interix ~amd64-linux ~ia64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris ~x86-winnt"
16     IUSE=""
17    
18 vapier 1.2 # platforms like AIX don't have a good ar
19     DEPEND="kernel_AIX? ( app-arch/deb2targz )"
20     # openssl: we run `c_rehash`
21     # debianutils: we run `run-parts`
22 grobian 1.1 RDEPEND="${DEPEND}
23     dev-libs/openssl
24 vapier 1.2 sys-apps/debianutils"
25 grobian 1.1
26     S=${WORKDIR}
27    
28     pkg_setup() {
29     # For the conversion to having it in CONFIG_PROTECT_MASK,
30     # we need to tell users about it once manually first.
31     [[ -f "${EPREFIX}"/etc/env.d/98ca-certificates ]] \
32     || ewarn "You should run update-ca-certificates manually after etc-update"
33     }
34    
35     src_unpack() {
36     if [[ -n ${EPREFIX} ]] ; then
37     # need to perform everything in the offset, #381937
38     mkdir -p "./${EPREFIX}"
39     cd "./${EPREFIX}" || die
40     fi
41     unpack ${A}
42     unpack ./data.tar.gz
43     rm -f control.tar.gz data.tar.gz debian-binary
44     }
45    
46     src_prepare() {
47     cd "./${EPREFIX}" || die
48     epatch "${FILESDIR}"/${PN}-20090709-root.patch
49     sed -i -e '/="$ROOT/s:ROOT/:ROOT'"${EPREFIX}"'/:' \
50     usr/sbin/update-ca-certificates || die
51     }
52    
53     src_compile() {
54     (
55     echo "# Automatically generated by ${CATEGORY}/${PF}"
56     echo "# $(date -u)"
57     echo "# Do not edit."
58     cd "${S}${EPREFIX}"/usr/share/ca-certificates
59     find * -name '*.crt' | LC_ALL=C sort
60     ) > "${S}${EPREFIX}"/etc/ca-certificates.conf
61    
62     "${S}${EPREFIX}"/usr/sbin/update-ca-certificates --root "${S}"
63     }
64    
65     src_install() {
66     cp -pPR * "${D}"/ || die
67    
68     mv "${ED}"/usr/share/doc/{ca-certificates,${PF}} || die
69     prepalldocs
70    
71     echo 'CONFIG_PROTECT_MASK="/etc/ca-certificates.conf"' > 98ca-certificates
72     doenvd 98ca-certificates
73     }
74    
75     pkg_postinst() {
76     if [ -d "${EROOT}/usr/local/share/ca-certificates" ] ; then
77     # if the user has local certs, we need to rebuild again
78     # to include their stuff in the db.
79     # However it's too overzealous when the user has custom certs in place.
80     # --fresh is to clean up dangling symlinks
81     "${EROOT}"/usr/sbin/update-ca-certificates --root "${EROOT}"
82     fi
83    
84     local c badcerts=0
85     for c in $(find -L "${EROOT}"etc/ssl/certs/ -type l) ; do
86     ewarn "Broken symlink for a certificate at $c"
87     badcerts=1
88     done
89     if [ $badcerts -eq 1 ]; then
90     ewarn "You MUST remove the above broken symlinks"
91     ewarn "Otherwise any SSL validation that use the directory may fail!"
92     ewarn "To batch-remove them, run:"
93     ewarn "find -L ${EROOT}etc/ssl/certs/ -type l -exec rm {} +"
94     fi
95     }

  ViewVC Help
Powered by ViewVC 1.1.20