/[gentoo-x86]/app-crypt/gnupg/gnupg-2.0.19.ebuild
Gentoo

Contents of /app-crypt/gnupg/gnupg-2.0.19.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.7 - (hide annotations) (download)
Mon Jun 25 06:30:31 2012 UTC (2 years, 5 months ago) by jdhore
Branch: MAIN
Changes since 1.6: +2 -2 lines
marked x86 per bug 421591

(Portage version: 2.2.0_alpha112/cvs/Linux i686)

1 radhermit 1.1 # Copyright 1999-2012 Gentoo Foundation
2     # Distributed under the terms of the GNU General Public License v2
3 jdhore 1.7 # $Header: /var/cvsroot/gentoo-x86/app-crypt/gnupg/gnupg-2.0.19.ebuild,v 1.6 2012/06/24 10:39:27 ago Exp $
4 radhermit 1.1
5     EAPI="4"
6    
7 zmedico 1.5 inherit eutils flag-o-matic toolchain-funcs
8 radhermit 1.1
9     DESCRIPTION="The GNU Privacy Guard, a GPL pgp replacement"
10     HOMEPAGE="http://www.gnupg.org/"
11     SRC_URI="mirror://gnupg/gnupg/${P}.tar.bz2"
12     # SRC_URI="ftp://ftp.gnupg.org/gcrypt/${PN}/${P}.tar.bz2"
13    
14     LICENSE="GPL-3"
15     SLOT="0"
16 jdhore 1.7 KEYWORDS="~alpha amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc x86 ~amd64-fbsd ~x86-fbsd ~x64-freebsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
17 radhermit 1.1 IUSE="adns bzip2 doc ldap nls readline static selinux smartcard usb"
18    
19     COMMON_DEPEND_LIBS="
20     >=dev-libs/libassuan-2
21     >=dev-libs/libgcrypt-1.4
22     >=dev-libs/libgpg-error-1.7
23     >=dev-libs/libksba-1.0.7
24     >=dev-libs/pth-1.3.7
25     >=net-misc/curl-7.10
26     sys-libs/zlib
27     adns? ( >=net-libs/adns-1.4 )
28     bzip2? ( app-arch/bzip2 )
29     readline? ( sys-libs/readline )
30     smartcard? ( usb? ( virtual/libusb:0 ) )
31     ldap? ( net-nds/openldap )"
32     COMMON_DEPEND_BINS="|| ( app-crypt/pinentry app-crypt/pinentry-qt )"
33    
34     # Existence of executables is checked during configuration.
35     DEPEND="${COMMON_DEPEND_LIBS}
36     ${COMMON_DEPEND_BINS}
37     static? (
38     >=dev-libs/libassuan-2[static-libs]
39     >=dev-libs/libgcrypt-1.4[static-libs]
40     >=dev-libs/libgpg-error-1.7[static-libs]
41     >=dev-libs/libksba-1.0.7[static-libs]
42     >=dev-libs/pth-1.3.7[static-libs]
43     || ( sys-libs/zlib[static-libs] <sys-libs/zlib-1.2.5.1-r2 )
44     )
45     nls? ( sys-devel/gettext )
46     doc? ( sys-apps/texinfo )"
47    
48     RDEPEND="!static? ( ${COMMON_DEPEND_LIBS} )
49     ${COMMON_DEPEND_BINS}
50     virtual/mta
51     !<=app-crypt/gnupg-2.0.1
52 swift 1.3 selinux? ( sec-policy/selinux-gpg )
53 radhermit 1.1 nls? ( virtual/libintl )"
54    
55     REQUIRED_USE="smartcard? ( !static )"
56    
57     src_prepare() {
58     epatch "${FILESDIR}"/${PN}-2.0.17-gpgsm-gencert.patch
59     }
60    
61     src_configure() {
62     local myconf
63    
64     # 'USE=static' support was requested:
65     # gnupg1: bug #29299
66     # gnupg2: bug #159623
67     use static && append-ldflags -static
68    
69     if use smartcard; then
70     myconf+=" --enable-scdaemon $(use_enable usb ccid-driver)"
71     else
72     myconf+=" --disable-scdaemon"
73     fi
74    
75     econf \
76     --docdir="${EPREFIX}/usr/share/doc/${PF}" \
77     --enable-gpg \
78     --enable-gpgsm \
79     --enable-agent \
80     ${myconf} \
81     $(use_with adns) \
82     $(use_enable bzip2) \
83     $(use_enable !elibc_SunOS symcryptrun) \
84     $(use_enable nls) \
85     $(use_enable ldap) \
86     $(use_with readline) \
87     CC_FOR_BUILD="$(tc-getBUILD_CC)"
88     }
89    
90     src_compile() {
91     emake
92    
93     if use doc; then
94     cd doc
95     emake html
96     fi
97     }
98    
99     src_install() {
100     emake DESTDIR="${D}" install
101     emake DESTDIR="${D}" -f doc/Makefile uninstall-nobase_dist_docDATA
102     rm -r "${ED}usr/share/gnupg/help"*
103    
104     dodoc ChangeLog NEWS README THANKS TODO VERSION doc/FAQ doc/DETAILS \
105     doc/HACKING doc/TRANSLATE doc/OpenPGP doc/KEYSERVER doc/help*
106    
107     dosym gpg2 /usr/bin/gpg
108     dosym gpgv2 /usr/bin/gpgv
109     dosym gpg2keys_hkp /usr/libexec/gpgkeys_hkp
110     dosym gpg2keys_finger /usr/libexec/gpgkeys_finger
111     dosym gpg2keys_curl /usr/libexec/gpgkeys_curl
112     if use ldap; then
113     dosym gpg2keys_ldap /usr/libexec/gpgkeys_ldap
114     fi
115     echo ".so man1/gpg2.1" > "${ED}usr/share/man/man1/gpg.1"
116     echo ".so man1/gpgv2.1" > "${ED}usr/share/man/man1/gpgv.1"
117    
118     dodir /etc/env.d
119     echo "CONFIG_PROTECT=/usr/share/gnupg/qualified.txt" >>"${ED}etc/env.d/30gnupg"
120    
121     if use doc; then
122     dohtml doc/gnupg.html/* doc/*.png
123     fi
124     }
125    
126     pkg_postinst() {
127     elog "If you wish to view images emerge:"
128     elog "media-gfx/xloadimage, media-gfx/xli or any other viewer"
129     elog "Remember to use photo-viewer option in configuration file to activate"
130     elog "the right viewer."
131     elog
132    
133     if use smartcard; then
134     elog "To use your OpenPGP smartcard (or token) with GnuPG you need one of"
135 ssuominen 1.4 use usb && elog " - a CCID-compatible reader, used directly through libusb;"
136 radhermit 1.1 elog " - sys-apps/pcsc-lite and a compatible reader device;"
137     elog " - dev-libs/openct and a compatible reader device;"
138     elog " - a reader device and drivers exporting either PC/SC or CT-API interfaces."
139     elog ""
140     elog "General hint: you probably want to try installing sys-apps/pcsc-lite and"
141     elog "app-crypt/ccid first."
142     fi
143    
144     ewarn "Please remember to restart gpg-agent if a different version"
145     ewarn "of the agent is currently used. If you are unsure of the gpg"
146     ewarn "agent you are using please run 'killall gpg-agent',"
147     ewarn "and to start a fresh daemon just run 'gpg-agent --daemon'."
148     }

  ViewVC Help
Powered by ViewVC 1.1.20