Mon, 17 Sep 2012 19:10:10 +0200
Update to new version of vendor software although Oracle fails to deliver.
More specifically, newer db(3) patch revisions exist but Oracle has
removed them from the canonical download server URI for Berkely DB.
michael@30 | 1 | ## |
michael@30 | 2 | ## gnupg.spec -- OpenPKG RPM Package Specification |
michael@286 | 3 | ## Copyright (c) 2000-2010 OpenPKG Foundation e.V. <http://openpkg.net/> |
michael@30 | 4 | ## |
michael@30 | 5 | ## Permission to use, copy, modify, and distribute this software for |
michael@30 | 6 | ## any purpose with or without fee is hereby granted, provided that |
michael@30 | 7 | ## the above copyright notice and this permission notice appear in all |
michael@30 | 8 | ## copies. |
michael@30 | 9 | ## |
michael@30 | 10 | ## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED |
michael@30 | 11 | ## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF |
michael@30 | 12 | ## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
michael@30 | 13 | ## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR |
michael@30 | 14 | ## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |
michael@30 | 15 | ## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
michael@30 | 16 | ## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF |
michael@30 | 17 | ## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND |
michael@30 | 18 | ## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, |
michael@30 | 19 | ## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT |
michael@30 | 20 | ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
michael@30 | 21 | ## SUCH DAMAGE. |
michael@30 | 22 | ## |
michael@30 | 23 | |
michael@30 | 24 | # package information |
michael@30 | 25 | Name: gnupg |
michael@30 | 26 | Summary: GNU Privacy Guard |
michael@30 | 27 | URL: http://www.gnupg.org/ |
michael@30 | 28 | Vendor: Werner Koch |
michael@30 | 29 | Packager: OpenPKG Foundation e.V. |
michael@30 | 30 | Distribution: OpenPKG Community |
michael@30 | 31 | Class: PLUS |
michael@30 | 32 | Group: PGP |
michael@30 | 33 | License: GPL |
michael@462 | 34 | Version: 2.0.19 |
michael@462 | 35 | Release: 20120800 |
michael@30 | 36 | |
michael@30 | 37 | # package options |
michael@462 | 38 | %option with_setuid yes |
michael@462 | 39 | %option with_curl yes |
michael@462 | 40 | %option with_ldap no |
michael@462 | 41 | %option with_idea no |
michael@30 | 42 | |
michael@30 | 43 | # list of sources |
michael@30 | 44 | Source0: ftp://ftp.gnupg.org/gcrypt/gnupg/gnupg-%{version}.tar.bz2 |
michael@30 | 45 | Patch0: gnupg.patch |
michael@30 | 46 | |
michael@30 | 47 | # build information |
michael@462 | 48 | BuildPreReq: OpenPKG, openpkg >= 20100101, make |
michael@462 | 49 | PreReq: OpenPKG, openpkg >= 20100101, pinentry |
michael@286 | 50 | BuildPreReq: gcrypt >= 1.2.3, libksba >= 1.0.2, libassuan >= 2.0.0, gpg-error >= 1.4 |
michael@286 | 51 | PreReq: gcrypt >= 1.2.3, libksba >= 1.0.2, libassuan >= 2.0.0, gpg-error >= 1.4 |
michael@30 | 52 | BuildPreReq: zlib, bzip2, readline, pth, libiconv |
michael@30 | 53 | PreReq: zlib, bzip2, readline, pth, libiconv |
michael@30 | 54 | %if "%{with_curl}" == "yes" |
michael@30 | 55 | BuildPreReq: curl, openssl |
michael@30 | 56 | PreReq: curl, openssl |
michael@30 | 57 | %endif |
michael@30 | 58 | %if "%{with_ldap}" == "yes" |
michael@30 | 59 | BuildPreReq: openldap, openssl |
michael@30 | 60 | PreReq: openldap, openssl |
michael@30 | 61 | %endif |
michael@107 | 62 | %if "%{with_idea}" == "yes" |
michael@107 | 63 | BuildPreReq: gcrypt::with_idea |
michael@107 | 64 | PreReq: gcrypt::with_idea |
michael@107 | 65 | %endif |
michael@30 | 66 | |
michael@30 | 67 | %description |
michael@30 | 68 | GnuPG (GNU Privacy Guard) is a GNU utility for encrypting data and |
michael@30 | 69 | creating digital signatures. GnuPG has advanced key management |
michael@30 | 70 | capabilities and is compliant with the proposed OpenPGP Internet |
michael@30 | 71 | standard described in RFC2440. Since GnuPG doesn't use any patented |
michael@30 | 72 | algorithm, it is not compatible with any version of PGP2 (PGP2.x |
michael@30 | 73 | uses only IDEA, patented worldwide). |
michael@30 | 74 | |
michael@30 | 75 | %track |
michael@30 | 76 | prog gnupg = { |
michael@30 | 77 | version = %{version} |
michael@30 | 78 | url = ftp://ftp.gnupg.org/gcrypt/gnupg/ |
michael@30 | 79 | regex = gnupg-(2\.__VER__)\.tar\.(gz|bz2) |
michael@30 | 80 | } |
michael@30 | 81 | |
michael@30 | 82 | %prep |
michael@30 | 83 | %setup -q -n gnupg-%{version} |
michael@30 | 84 | %patch -p0 |
michael@30 | 85 | chmod a+rx scripts/install-sh |
michael@30 | 86 | %{l_shtool} subst \ |
michael@30 | 87 | -e 's;PRINTABLE_OS_NAME;"%{l_openpkg_release}";g' \ |
michael@30 | 88 | g10/armor.c |
michael@30 | 89 | |
michael@30 | 90 | %build |
michael@30 | 91 | # configure program |
michael@30 | 92 | export LIBS="" |
michael@31 | 93 | case "%{l_platform -t}" in |
michael@31 | 94 | *-sunos* ) LIBS="$LIBS -lsocket -lnsl" ;; |
michael@31 | 95 | esac |
michael@30 | 96 | echo "int main(int argc, char *argv[]) { return 0; }" >dummy.c |
michael@30 | 97 | for lib in termcap termlib curses ncurses; do |
michael@30 | 98 | rc=0; %{l_cc} -o dummy dummy.c -l$lib >/dev/null 2>&1 || rc=1 |
michael@30 | 99 | if [ $rc -eq 0 ]; then LIBS="$LIBS -l$lib"; break; fi |
michael@30 | 100 | done |
michael@30 | 101 | %if "%{with_curl}" == "yes" || "%{with_ldap}" == "yes" |
michael@30 | 102 | LIBS="$LIBS -lssl -lcrypto" |
michael@30 | 103 | %endif |
michael@30 | 104 | %if "%{with_curl}" == "yes" |
michael@30 | 105 | LIBS="$LIBS -lz" |
michael@30 | 106 | %endif |
michael@30 | 107 | LIBS="$LIBS -liconv" |
michael@30 | 108 | export CC="%{l_cc}" |
michael@30 | 109 | export CFLAGS="%{l_cflags -O}" |
michael@30 | 110 | export CPPFLAGS="%{l_cppflags}" |
michael@107 | 111 | %if "%{with_idea}" == "yes" |
michael@107 | 112 | export CPPFLAGS="-DUSE_IDEA $CPPFLAGS" |
michael@107 | 113 | %endif |
michael@30 | 114 | export LDFLAGS="%{l_ldflags}" |
michael@30 | 115 | ./configure \ |
michael@30 | 116 | --prefix=%{l_prefix} \ |
michael@30 | 117 | --libexecdir=%{l_prefix}/libexec/gnupg \ |
michael@30 | 118 | --mandir=%{l_prefix}/man \ |
michael@30 | 119 | --infodir=%{l_prefix}/info \ |
michael@30 | 120 | --with-zlib=%{l_prefix} \ |
michael@30 | 121 | --with-bzip2=%{l_prefix} \ |
michael@30 | 122 | --with-readline=%{l_prefix} \ |
michael@30 | 123 | --with-libiconv-prefix=%{l_prefix} \ |
michael@30 | 124 | --with-gpg-error-prefix=%{l_prefix} \ |
michael@30 | 125 | --with-libgcrypt-prefix=%{l_prefix} \ |
michael@30 | 126 | --with-libassuan-prefix=%{l_prefix} \ |
michael@30 | 127 | --with-ksba-prefix=%{l_prefix} \ |
michael@30 | 128 | --with-pth-prefix=%{l_prefix} \ |
michael@30 | 129 | --with-agent-pgm=%{l_prefix}/bin/gpg-agent \ |
michael@30 | 130 | --with-pinentry-pgm=%{l_prefix}/bin/pinentry \ |
michael@30 | 131 | --with-dirmngr-pgm=%{l_prefix}/bin/dirmngr \ |
michael@30 | 132 | %if "%{with_curl}" == "yes" |
michael@30 | 133 | --with-libcurl=%{l_prefix} \ |
michael@30 | 134 | %else |
michael@30 | 135 | --without-libcurl \ |
michael@30 | 136 | %endif |
michael@30 | 137 | --without-libintl-prefix \ |
michael@30 | 138 | --disable-nls \ |
michael@30 | 139 | --disable-scdaemon \ |
michael@30 | 140 | --enable-generic \ |
michael@30 | 141 | --enable-finger \ |
michael@30 | 142 | --enable-hkp \ |
michael@30 | 143 | %if "%{with_ldap}" == "yes" |
michael@30 | 144 | --enable-ldap \ |
michael@30 | 145 | %else |
michael@30 | 146 | --disable-ldap \ |
michael@30 | 147 | %endif |
michael@30 | 148 | %if "%{with_curl}" == "yes" |
michael@30 | 149 | --with-libcurl=%{l_prefix} \ |
michael@30 | 150 | %else |
michael@30 | 151 | --without-libcurl \ |
michael@30 | 152 | %endif |
michael@30 | 153 | --enable-exec \ |
michael@30 | 154 | --enable-keyserver-helpers \ |
michael@30 | 155 | --with-mailprog="%{l_prefix}/sbin/sendmail" \ |
michael@30 | 156 | --disable-mailto |
michael@30 | 157 | |
michael@30 | 158 | # build program |
michael@462 | 159 | %{l_make} %{l_mflags -O} |
michael@30 | 160 | |
michael@30 | 161 | %install |
michael@30 | 162 | # install program |
michael@462 | 163 | %{l_make} %{l_mflags} install DESTDIR="$RPM_BUILD_ROOT" |
michael@30 | 164 | |
michael@462 | 165 | # provide unversioned names |
michael@462 | 166 | ln $RPM_BUILD_ROOT%{l_prefix}/bin/gpg2 \ |
michael@462 | 167 | $RPM_BUILD_ROOT%{l_prefix}/bin/gpg |
michael@462 | 168 | ln $RPM_BUILD_ROOT%{l_prefix}/bin/gpgv2 \ |
michael@462 | 169 | $RPM_BUILD_ROOT%{l_prefix}/bin/gpgv |
michael@462 | 170 | ln $RPM_BUILD_ROOT%{l_prefix}/man/man1/gpg2.1 \ |
michael@462 | 171 | $RPM_BUILD_ROOT%{l_prefix}/man/man1/gpg.1 |
michael@462 | 172 | ln $RPM_BUILD_ROOT%{l_prefix}/man/man1/gpgv2.1 \ |
michael@462 | 173 | $RPM_BUILD_ROOT%{l_prefix}/man/man1/gpgv.1 |
michael@30 | 174 | |
michael@30 | 175 | # strip down and post-adjust installation files |
michael@30 | 176 | strip $RPM_BUILD_ROOT%{l_prefix}/bin/* 2>/dev/null || true |
michael@30 | 177 | strip $RPM_BUILD_ROOT%{l_prefix}/libexec/gnupg/* 2>/dev/null || true |
michael@30 | 178 | rm -f $RPM_BUILD_ROOT%{l_prefix}/info/dir |
michael@30 | 179 | rm -f $RPM_BUILD_ROOT%{l_prefix}/man/man1/scdaemon.1 |
michael@30 | 180 | mv $RPM_BUILD_ROOT%{l_prefix}/bin/gpgsm-gencert.sh \ |
michael@30 | 181 | $RPM_BUILD_ROOT%{l_prefix}/bin/gpgsm-gencert |
michael@30 | 182 | mv $RPM_BUILD_ROOT%{l_prefix}/man/man1/gpgsm-gencert.sh.1 \ |
michael@30 | 183 | $RPM_BUILD_ROOT%{l_prefix}/man/man1/gpgsm-gencert.1 |
michael@30 | 184 | |
michael@30 | 185 | # determine installation files |
michael@30 | 186 | %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \ |
michael@30 | 187 | %{l_files_std} \ |
michael@373 | 188 | %if "%{with_setuid}" == "yes" |
michael@462 | 189 | '%attr(4755,%{l_susr},%{l_mgrp}) %{l_prefix}/bin/gpg' \ |
michael@30 | 190 | '%attr(4755,%{l_susr},%{l_mgrp}) %{l_prefix}/bin/gpg2' |
michael@373 | 191 | %else |
michael@462 | 192 | '%attr(0755,%{l_susr},%{l_mgrp}) %{l_prefix}/bin/gpg' \ |
michael@373 | 193 | '%attr(0755,%{l_susr},%{l_mgrp}) %{l_prefix}/bin/gpg2' |
michael@373 | 194 | %endif |
michael@30 | 195 | |
michael@30 | 196 | %files -f files |
michael@30 | 197 | |
michael@30 | 198 | %clean |
michael@30 | 199 |