Wed, 07 Jan 2009 22:13:49 +0100
Import package vendor original specs for necessary manipulations.
gnupg/gnupg.patch | file | annotate | diff | comparison | revisions | |
gnupg/gnupg.spec | file | annotate | diff | comparison | revisions |
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/gnupg/gnupg.patch Wed Jan 07 22:13:49 2009 +0100 1.3 @@ -0,0 +1,35 @@ 1.4 +Index: agent/genkey.c 1.5 +--- agent/genkey.c.orig 2007-11-19 16:11:31 +0100 1.6 ++++ agent/genkey.c 2007-12-21 09:17:46 +0100 1.7 +@@ -188,11 +188,9 @@ 1.8 + return gpg_error (GPG_ERR_INV_PASSPHRASE); 1.9 + 1.10 + desc = xtryasprintf 1.11 +- ( ngettext ("Warning: You have entered an insecure passphrase.%%0A" 1.12 ++ ( "Warning: You have entered an insecure passphrase.%%0A" 1.13 + "A passphrase should be at least %u character long.", 1.14 +- "Warning: You have entered an insecure passphrase.%%0A" 1.15 +- "A passphrase should be at least %u characters long.", 1.16 +- minlen), minlen ); 1.17 ++ minlen); 1.18 + if (!desc) 1.19 + return gpg_error_from_syserror (); 1.20 + err = take_this_one_anyway (ctrl, desc); 1.21 +Index: configure 1.22 +--- configure.orig 2007-12-20 09:40:04 +0100 1.23 ++++ configure 2007-12-21 09:08:55 +0100 1.24 +@@ -6909,13 +6909,13 @@ 1.25 + # Check wether it is necessary to link against libdl. 1.26 + # 1.27 + gnupg_dlopen_save_libs="$LIBS" 1.28 +-LIBS="" 1.29 + { echo "$as_me:$LINENO: checking for library containing dlopen" >&5 1.30 + echo $ECHO_N "checking for library containing dlopen... $ECHO_C" >&6; } 1.31 + if test "${ac_cv_search_dlopen+set}" = set; then 1.32 + echo $ECHO_N "(cached) $ECHO_C" >&6 1.33 + else 1.34 + ac_func_search_save_LIBS=$LIBS 1.35 ++ LIBS="" 1.36 + cat >conftest.$ac_ext <<_ACEOF 1.37 + /* confdefs.h. */ 1.38 + _ACEOF
2.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 2.2 +++ b/gnupg/gnupg.spec Wed Jan 07 22:13:49 2009 +0100 2.3 @@ -0,0 +1,190 @@ 2.4 +## 2.5 +## gnupg.spec -- OpenPKG RPM Package Specification 2.6 +## Copyright (c) 2000-2008 OpenPKG Foundation e.V. <http://openpkg.net/> 2.7 +## 2.8 +## Permission to use, copy, modify, and distribute this software for 2.9 +## any purpose with or without fee is hereby granted, provided that 2.10 +## the above copyright notice and this permission notice appear in all 2.11 +## copies. 2.12 +## 2.13 +## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED 2.14 +## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 2.15 +## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 2.16 +## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR 2.17 +## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 2.18 +## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 2.19 +## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF 2.20 +## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 2.21 +## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 2.22 +## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT 2.23 +## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 2.24 +## SUCH DAMAGE. 2.25 +## 2.26 + 2.27 +# package information 2.28 +Name: gnupg 2.29 +Summary: GNU Privacy Guard 2.30 +URL: http://www.gnupg.org/ 2.31 +Vendor: Werner Koch 2.32 +Packager: OpenPKG Foundation e.V. 2.33 +Distribution: OpenPKG Community 2.34 +Class: PLUS 2.35 +Group: PGP 2.36 +License: GPL 2.37 +Version: 2.0.9 2.38 +Release: 20080326 2.39 + 2.40 +# package options 2.41 +%option with_curl yes 2.42 +%option with_ldap no 2.43 + 2.44 +# list of sources 2.45 +Source0: ftp://ftp.gnupg.org/gcrypt/gnupg/gnupg-%{version}.tar.bz2 2.46 +Patch0: gnupg.patch 2.47 + 2.48 +# build information 2.49 +Prefix: %{l_prefix} 2.50 +BuildRoot: %{l_buildroot} 2.51 +BuildPreReq: OpenPKG, openpkg >= 20040130, make 2.52 +PreReq: OpenPKG, openpkg >= 20040130, pinentry 2.53 +BuildPreReq: gcrypt >= 1.2.3, libksba >= 1.0.2, libassuan >= 1.0.2, gpg-error >= 1.4 2.54 +PreReq: gcrypt >= 1.2.3, libksba >= 1.0.2, libassuan >= 1.0.2, gpg-error >= 1.4 2.55 +BuildPreReq: zlib, bzip2, readline, pth, libiconv 2.56 +PreReq: zlib, bzip2, readline, pth, libiconv 2.57 +%if "%{with_curl}" == "yes" 2.58 +BuildPreReq: curl, openssl 2.59 +PreReq: curl, openssl 2.60 +%endif 2.61 +%if "%{with_ldap}" == "yes" 2.62 +BuildPreReq: openldap, openssl 2.63 +PreReq: openldap, openssl 2.64 +%endif 2.65 +AutoReq: no 2.66 +AutoReqProv: no 2.67 + 2.68 +%description 2.69 + GnuPG (GNU Privacy Guard) is a GNU utility for encrypting data and 2.70 + creating digital signatures. GnuPG has advanced key management 2.71 + capabilities and is compliant with the proposed OpenPGP Internet 2.72 + standard described in RFC2440. Since GnuPG doesn't use any patented 2.73 + algorithm, it is not compatible with any version of PGP2 (PGP2.x 2.74 + uses only IDEA, patented worldwide). 2.75 + 2.76 +%track 2.77 + prog gnupg = { 2.78 + version = %{version} 2.79 + url = ftp://ftp.gnupg.org/gcrypt/gnupg/ 2.80 + regex = gnupg-(2\.__VER__)\.tar\.(gz|bz2) 2.81 + } 2.82 + 2.83 +%prep 2.84 + %setup -q -n gnupg-%{version} 2.85 + %patch -p0 2.86 + chmod a+rx scripts/install-sh 2.87 + %{l_shtool} subst \ 2.88 + -e 's;PRINTABLE_OS_NAME;"%{l_openpkg_release}";g' \ 2.89 + g10/armor.c 2.90 + 2.91 +%build 2.92 + # configure program 2.93 + export LIBS="" 2.94 + echo "int main(int argc, char *argv[]) { return 0; }" >dummy.c 2.95 + for lib in termcap termlib curses ncurses; do 2.96 + rc=0; %{l_cc} -o dummy dummy.c -l$lib >/dev/null 2>&1 || rc=1 2.97 + if [ $rc -eq 0 ]; then LIBS="$LIBS -l$lib"; break; fi 2.98 + done 2.99 +%if "%{with_curl}" == "yes" || "%{with_ldap}" == "yes" 2.100 + LIBS="$LIBS -lssl -lcrypto" 2.101 +%endif 2.102 +%if "%{with_curl}" == "yes" 2.103 + LIBS="$LIBS -lz" 2.104 +%endif 2.105 + LIBS="$LIBS -liconv" 2.106 + export CC="%{l_cc}" 2.107 + export CFLAGS="%{l_cflags -O}" 2.108 + export CPPFLAGS="%{l_cppflags}" 2.109 + export LDFLAGS="%{l_ldflags}" 2.110 + ./configure \ 2.111 + --prefix=%{l_prefix} \ 2.112 + --libexecdir=%{l_prefix}/libexec/gnupg \ 2.113 + --mandir=%{l_prefix}/man \ 2.114 + --infodir=%{l_prefix}/info \ 2.115 + --with-zlib=%{l_prefix} \ 2.116 + --with-bzip2=%{l_prefix} \ 2.117 + --with-readline=%{l_prefix} \ 2.118 + --with-libiconv-prefix=%{l_prefix} \ 2.119 + --with-gpg-error-prefix=%{l_prefix} \ 2.120 + --with-libgcrypt-prefix=%{l_prefix} \ 2.121 + --with-libassuan-prefix=%{l_prefix} \ 2.122 + --with-ksba-prefix=%{l_prefix} \ 2.123 + --with-pth-prefix=%{l_prefix} \ 2.124 + --with-agent-pgm=%{l_prefix}/bin/gpg-agent \ 2.125 + --with-pinentry-pgm=%{l_prefix}/bin/pinentry \ 2.126 + --with-dirmngr-pgm=%{l_prefix}/bin/dirmngr \ 2.127 + --with-included-regex \ 2.128 +%if "%{with_curl}" == "yes" 2.129 + --with-libcurl=%{l_prefix} \ 2.130 +%else 2.131 + --without-libcurl \ 2.132 +%endif 2.133 + --without-included-gettext \ 2.134 + --without-libintl-prefix \ 2.135 + --disable-nls \ 2.136 + --disable-scdaemon \ 2.137 + --enable-generic \ 2.138 + --enable-finger \ 2.139 + --enable-hkp \ 2.140 +%if "%{with_ldap}" == "yes" 2.141 + --enable-ldap \ 2.142 +%else 2.143 + --disable-ldap \ 2.144 +%endif 2.145 +%if "%{with_curl}" == "yes" 2.146 + --with-libcurl=%{l_prefix} \ 2.147 +%else 2.148 + --without-libcurl \ 2.149 +%endif 2.150 + --enable-exec \ 2.151 + --enable-keyserver-helpers \ 2.152 + --with-mailprog="%{l_prefix}/sbin/sendmail" \ 2.153 + --disable-mailto 2.154 + 2.155 + # build program 2.156 + %{l_make} %{l_mflags} 2.157 + 2.158 +%install 2.159 + # install program 2.160 + rm -rf $RPM_BUILD_ROOT 2.161 + %{l_make} %{l_mflags} install AM_MAKEFLAGS="DESTDIR=$RPM_BUILD_ROOT" 2.162 + 2.163 + # provide unversioned names 2.164 + ln $RPM_BUILD_ROOT%{l_prefix}/bin/gpg2 \ 2.165 + $RPM_BUILD_ROOT%{l_prefix}/bin/gpg 2.166 + ln $RPM_BUILD_ROOT%{l_prefix}/bin/gpgv2 \ 2.167 + $RPM_BUILD_ROOT%{l_prefix}/bin/gpgv 2.168 + ln $RPM_BUILD_ROOT%{l_prefix}/man/man1/gpg2.1 \ 2.169 + $RPM_BUILD_ROOT%{l_prefix}/man/man1/gpg.1 2.170 + ln $RPM_BUILD_ROOT%{l_prefix}/man/man1/gpgv2.1 \ 2.171 + $RPM_BUILD_ROOT%{l_prefix}/man/man1/gpgv.1 2.172 + 2.173 + # strip down and post-adjust installation files 2.174 + strip $RPM_BUILD_ROOT%{l_prefix}/bin/* 2>/dev/null || true 2.175 + strip $RPM_BUILD_ROOT%{l_prefix}/libexec/gnupg/* 2>/dev/null || true 2.176 + rm -f $RPM_BUILD_ROOT%{l_prefix}/info/dir 2.177 + rm -f $RPM_BUILD_ROOT%{l_prefix}/man/man1/scdaemon.1 2.178 + mv $RPM_BUILD_ROOT%{l_prefix}/bin/gpgsm-gencert.sh \ 2.179 + $RPM_BUILD_ROOT%{l_prefix}/bin/gpgsm-gencert 2.180 + mv $RPM_BUILD_ROOT%{l_prefix}/man/man1/gpgsm-gencert.sh.1 \ 2.181 + $RPM_BUILD_ROOT%{l_prefix}/man/man1/gpgsm-gencert.1 2.182 + 2.183 + # determine installation files 2.184 + %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \ 2.185 + %{l_files_std} \ 2.186 + '%attr(4755,%{l_susr},%{l_mgrp}) %{l_prefix}/bin/gpg' \ 2.187 + '%attr(4755,%{l_susr},%{l_mgrp}) %{l_prefix}/bin/gpg2' 2.188 + 2.189 +%files -f files 2.190 + 2.191 +%clean 2.192 + rm -rf $RPM_BUILD_ROOT 2.193 +