1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/gnupg/gnupg.spec Wed Jan 07 22:13:49 2009 +0100 1.3 @@ -0,0 +1,190 @@ 1.4 +## 1.5 +## gnupg.spec -- OpenPKG RPM Package Specification 1.6 +## Copyright (c) 2000-2008 OpenPKG Foundation e.V. <http://openpkg.net/> 1.7 +## 1.8 +## Permission to use, copy, modify, and distribute this software for 1.9 +## any purpose with or without fee is hereby granted, provided that 1.10 +## the above copyright notice and this permission notice appear in all 1.11 +## copies. 1.12 +## 1.13 +## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED 1.14 +## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 1.15 +## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 1.16 +## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR 1.17 +## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 1.18 +## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 1.19 +## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF 1.20 +## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 1.21 +## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 1.22 +## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT 1.23 +## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 1.24 +## SUCH DAMAGE. 1.25 +## 1.26 + 1.27 +# package information 1.28 +Name: gnupg 1.29 +Summary: GNU Privacy Guard 1.30 +URL: http://www.gnupg.org/ 1.31 +Vendor: Werner Koch 1.32 +Packager: OpenPKG Foundation e.V. 1.33 +Distribution: OpenPKG Community 1.34 +Class: PLUS 1.35 +Group: PGP 1.36 +License: GPL 1.37 +Version: 2.0.9 1.38 +Release: 20080326 1.39 + 1.40 +# package options 1.41 +%option with_curl yes 1.42 +%option with_ldap no 1.43 + 1.44 +# list of sources 1.45 +Source0: ftp://ftp.gnupg.org/gcrypt/gnupg/gnupg-%{version}.tar.bz2 1.46 +Patch0: gnupg.patch 1.47 + 1.48 +# build information 1.49 +Prefix: %{l_prefix} 1.50 +BuildRoot: %{l_buildroot} 1.51 +BuildPreReq: OpenPKG, openpkg >= 20040130, make 1.52 +PreReq: OpenPKG, openpkg >= 20040130, pinentry 1.53 +BuildPreReq: gcrypt >= 1.2.3, libksba >= 1.0.2, libassuan >= 1.0.2, gpg-error >= 1.4 1.54 +PreReq: gcrypt >= 1.2.3, libksba >= 1.0.2, libassuan >= 1.0.2, gpg-error >= 1.4 1.55 +BuildPreReq: zlib, bzip2, readline, pth, libiconv 1.56 +PreReq: zlib, bzip2, readline, pth, libiconv 1.57 +%if "%{with_curl}" == "yes" 1.58 +BuildPreReq: curl, openssl 1.59 +PreReq: curl, openssl 1.60 +%endif 1.61 +%if "%{with_ldap}" == "yes" 1.62 +BuildPreReq: openldap, openssl 1.63 +PreReq: openldap, openssl 1.64 +%endif 1.65 +AutoReq: no 1.66 +AutoReqProv: no 1.67 + 1.68 +%description 1.69 + GnuPG (GNU Privacy Guard) is a GNU utility for encrypting data and 1.70 + creating digital signatures. GnuPG has advanced key management 1.71 + capabilities and is compliant with the proposed OpenPGP Internet 1.72 + standard described in RFC2440. Since GnuPG doesn't use any patented 1.73 + algorithm, it is not compatible with any version of PGP2 (PGP2.x 1.74 + uses only IDEA, patented worldwide). 1.75 + 1.76 +%track 1.77 + prog gnupg = { 1.78 + version = %{version} 1.79 + url = ftp://ftp.gnupg.org/gcrypt/gnupg/ 1.80 + regex = gnupg-(2\.__VER__)\.tar\.(gz|bz2) 1.81 + } 1.82 + 1.83 +%prep 1.84 + %setup -q -n gnupg-%{version} 1.85 + %patch -p0 1.86 + chmod a+rx scripts/install-sh 1.87 + %{l_shtool} subst \ 1.88 + -e 's;PRINTABLE_OS_NAME;"%{l_openpkg_release}";g' \ 1.89 + g10/armor.c 1.90 + 1.91 +%build 1.92 + # configure program 1.93 + export LIBS="" 1.94 + echo "int main(int argc, char *argv[]) { return 0; }" >dummy.c 1.95 + for lib in termcap termlib curses ncurses; do 1.96 + rc=0; %{l_cc} -o dummy dummy.c -l$lib >/dev/null 2>&1 || rc=1 1.97 + if [ $rc -eq 0 ]; then LIBS="$LIBS -l$lib"; break; fi 1.98 + done 1.99 +%if "%{with_curl}" == "yes" || "%{with_ldap}" == "yes" 1.100 + LIBS="$LIBS -lssl -lcrypto" 1.101 +%endif 1.102 +%if "%{with_curl}" == "yes" 1.103 + LIBS="$LIBS -lz" 1.104 +%endif 1.105 + LIBS="$LIBS -liconv" 1.106 + export CC="%{l_cc}" 1.107 + export CFLAGS="%{l_cflags -O}" 1.108 + export CPPFLAGS="%{l_cppflags}" 1.109 + export LDFLAGS="%{l_ldflags}" 1.110 + ./configure \ 1.111 + --prefix=%{l_prefix} \ 1.112 + --libexecdir=%{l_prefix}/libexec/gnupg \ 1.113 + --mandir=%{l_prefix}/man \ 1.114 + --infodir=%{l_prefix}/info \ 1.115 + --with-zlib=%{l_prefix} \ 1.116 + --with-bzip2=%{l_prefix} \ 1.117 + --with-readline=%{l_prefix} \ 1.118 + --with-libiconv-prefix=%{l_prefix} \ 1.119 + --with-gpg-error-prefix=%{l_prefix} \ 1.120 + --with-libgcrypt-prefix=%{l_prefix} \ 1.121 + --with-libassuan-prefix=%{l_prefix} \ 1.122 + --with-ksba-prefix=%{l_prefix} \ 1.123 + --with-pth-prefix=%{l_prefix} \ 1.124 + --with-agent-pgm=%{l_prefix}/bin/gpg-agent \ 1.125 + --with-pinentry-pgm=%{l_prefix}/bin/pinentry \ 1.126 + --with-dirmngr-pgm=%{l_prefix}/bin/dirmngr \ 1.127 + --with-included-regex \ 1.128 +%if "%{with_curl}" == "yes" 1.129 + --with-libcurl=%{l_prefix} \ 1.130 +%else 1.131 + --without-libcurl \ 1.132 +%endif 1.133 + --without-included-gettext \ 1.134 + --without-libintl-prefix \ 1.135 + --disable-nls \ 1.136 + --disable-scdaemon \ 1.137 + --enable-generic \ 1.138 + --enable-finger \ 1.139 + --enable-hkp \ 1.140 +%if "%{with_ldap}" == "yes" 1.141 + --enable-ldap \ 1.142 +%else 1.143 + --disable-ldap \ 1.144 +%endif 1.145 +%if "%{with_curl}" == "yes" 1.146 + --with-libcurl=%{l_prefix} \ 1.147 +%else 1.148 + --without-libcurl \ 1.149 +%endif 1.150 + --enable-exec \ 1.151 + --enable-keyserver-helpers \ 1.152 + --with-mailprog="%{l_prefix}/sbin/sendmail" \ 1.153 + --disable-mailto 1.154 + 1.155 + # build program 1.156 + %{l_make} %{l_mflags} 1.157 + 1.158 +%install 1.159 + # install program 1.160 + rm -rf $RPM_BUILD_ROOT 1.161 + %{l_make} %{l_mflags} install AM_MAKEFLAGS="DESTDIR=$RPM_BUILD_ROOT" 1.162 + 1.163 + # provide unversioned names 1.164 + ln $RPM_BUILD_ROOT%{l_prefix}/bin/gpg2 \ 1.165 + $RPM_BUILD_ROOT%{l_prefix}/bin/gpg 1.166 + ln $RPM_BUILD_ROOT%{l_prefix}/bin/gpgv2 \ 1.167 + $RPM_BUILD_ROOT%{l_prefix}/bin/gpgv 1.168 + ln $RPM_BUILD_ROOT%{l_prefix}/man/man1/gpg2.1 \ 1.169 + $RPM_BUILD_ROOT%{l_prefix}/man/man1/gpg.1 1.170 + ln $RPM_BUILD_ROOT%{l_prefix}/man/man1/gpgv2.1 \ 1.171 + $RPM_BUILD_ROOT%{l_prefix}/man/man1/gpgv.1 1.172 + 1.173 + # strip down and post-adjust installation files 1.174 + strip $RPM_BUILD_ROOT%{l_prefix}/bin/* 2>/dev/null || true 1.175 + strip $RPM_BUILD_ROOT%{l_prefix}/libexec/gnupg/* 2>/dev/null || true 1.176 + rm -f $RPM_BUILD_ROOT%{l_prefix}/info/dir 1.177 + rm -f $RPM_BUILD_ROOT%{l_prefix}/man/man1/scdaemon.1 1.178 + mv $RPM_BUILD_ROOT%{l_prefix}/bin/gpgsm-gencert.sh \ 1.179 + $RPM_BUILD_ROOT%{l_prefix}/bin/gpgsm-gencert 1.180 + mv $RPM_BUILD_ROOT%{l_prefix}/man/man1/gpgsm-gencert.sh.1 \ 1.181 + $RPM_BUILD_ROOT%{l_prefix}/man/man1/gpgsm-gencert.1 1.182 + 1.183 + # determine installation files 1.184 + %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \ 1.185 + %{l_files_std} \ 1.186 + '%attr(4755,%{l_susr},%{l_mgrp}) %{l_prefix}/bin/gpg' \ 1.187 + '%attr(4755,%{l_susr},%{l_mgrp}) %{l_prefix}/bin/gpg2' 1.188 + 1.189 +%files -f files 1.190 + 1.191 +%clean 1.192 + rm -rf $RPM_BUILD_ROOT 1.193 +