pgp2/pgp2.spec

Mon, 28 Jan 2013 17:37:18 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Mon, 28 Jan 2013 17:37:18 +0100
changeset 758
a2c6460cfb16
parent 95
c15febc142b1
permissions
-rw-r--r--

Correct socket error reporting improvement with IPv6 portable code,
after helpful recommendation by Saúl Ibarra Corretgé on OSips devlist.

michael@95 1 ##
michael@95 2 ## pgp2.spec -- OpenPKG RPM Specification
michael@95 3 ## Copyright (c) 2000-2005 The OpenPKG Project <http://www.openpkg.org/>
michael@95 4 ## Copyright (c) 2000-2005 Ralf S. Engelschall <rse@engelschall.com>
michael@95 5 ## Copyright (c) 2000-2005 Cable & Wireless <http://www.cw.com/>
michael@95 6 ##
michael@95 7 ## Permission to use, copy, modify, and distribute this software for
michael@95 8 ## any purpose with or without fee is hereby granted, provided that
michael@95 9 ## the above copyright notice and this permission notice appear in all
michael@95 10 ## copies.
michael@95 11 ##
michael@95 12 ## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
michael@95 13 ## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
michael@95 14 ## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
michael@95 15 ## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
michael@95 16 ## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
michael@95 17 ## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
michael@95 18 ## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
michael@95 19 ## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
michael@95 20 ## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
michael@95 21 ## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
michael@95 22 ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
michael@95 23 ## SUCH DAMAGE.
michael@95 24 ##
michael@95 25
michael@95 26 # package version
michael@95 27 %define V_short 2.x
michael@95 28 %define V_long 2.6.3i
michael@95 29 %define V_strip 263
michael@95 30
michael@95 31 # package information
michael@95 32 Name: pgp2
michael@95 33 Summary: Pretty Good Privacy
michael@95 34 URL: http://www.pgpi.org/
michael@95 35 Vendor: Philip Zimmerman
michael@95 36 Packager: The OpenPKG Project
michael@95 37 Distribution: OpenPKG [PLUS]
michael@95 38 Group: Cryptography
michael@95 39 License: GPL
michael@95 40 Version: %{V_long}
michael@96 41 Release: 20090106
michael@95 42
michael@95 43 # list of sources
michael@95 44 Source0: ftp://ftp.pgpi.org/pub/pgp/%{V_short}/src/pgp%{V_strip}is.tar.gz
michael@95 45 Source1: language.idx
michael@95 46 Patch0: pgp2.patch
michael@95 47
michael@95 48 # build information
michael@95 49 Prefix: %{l_prefix}
michael@95 50 BuildRoot: %{l_buildroot}
michael@95 51 BuildPreReq: OpenPKG, openpkg >= 20030909, gcc
michael@95 52 PreReq: OpenPKG, openpkg >= 20030909
michael@95 53 AutoReq: no
michael@95 54 AutoReqProv: no
michael@95 55
michael@95 56 %description
michael@95 57 PGP (Pretty Good Privacy) is a public key encryption program originally
michael@95 58 written by Phil Zimmermann in 1991. This is version %{V_long}, considered
michael@95 59 a classic PGP by some and outdated by others. However, this version of PGP
michael@95 60 is absent of questionable security features implemented in more current
michael@95 61 releases. Because of this, some paranoid PGP users prefer this classic
michael@95 62 version. An article http://senderek.de/security/key-experiments.html
michael@95 63 explains the questionable security features of newer versions of PGP, and
michael@95 64 the reasons that PGP %{V_long} might be the most secure version to date.
michael@95 65
michael@95 66 This version includes '4k' patch code from Rich WALES. It will not display
michael@95 67 warnings regarding RSA patent rights, and allows key generation and
michael@95 68 processing of up to 4096 bits in length. For more information, please see
michael@95 69 http://www.richw.org/pgp/263i-4k-patch.
michael@95 70
michael@95 71 %prep
michael@95 72 # extract distribution
michael@95 73 %setup -c -n pgp-%{V_long}
michael@95 74 %{l_tar} -xf pgp%{V_strip}ii.tar
michael@95 75 %patch -p0
michael@95 76
michael@95 77 # patch distribution
michael@95 78 %{l_shtool} subst \
michael@96 79 -e 's;\/usr\/local\/lib\/pgp;%{l_prefix}\/etc\/pgp;' \
michael@95 80 src/fileio.h
michael@95 81
michael@95 82 %build
michael@95 83 # build program
michael@95 84 cd src
michael@95 85 CC="%{l_cc}"
michael@95 86 CFLAGS="%{l_cflags -O} -fno-strength-reduce"
michael@95 87 CFLAGS="$CFLAGS -DUNIX -DPORTABLE"
michael@95 88 case "%{l_platform -t}" in
michael@95 89 sparc* ) CFLAGS="$CFLAGS -DHIGHFIRST" ;;
michael@95 90 i?86* ) CFLAGS="$CFLAGS -DIDEA32" ;;
michael@95 91 esac
michael@95 92 case "%{l_platform -t}" in
michael@95 93 *-freebsd* ) CFLAGS="$CFLAGS -DMAX_NAMELEN=255" ;;
michael@95 94 *-linux* ) CFLAGS="$CFLAGS -DLINUX" ;;
michael@95 95 *-sunos* ) CFLAGS="$CFLAGS -DSOLARIS" ;;
michael@95 96 esac
michael@95 97 %{l_make} %{l_mflags} \
michael@95 98 CC="$CC" CFLAGS="$CFLAGS" pgp
michael@95 99
michael@95 100 %install
michael@95 101 rm -rf $RPM_BUILD_ROOT
michael@95 102 %{l_shtool} mkdir -f -p -m 755 \
michael@95 103 $RPM_BUILD_ROOT%{l_prefix}/bin \
michael@95 104 $RPM_BUILD_ROOT%{l_prefix}/man/man1 \
michael@96 105 $RPM_BUILD_ROOT%{l_prefix}/etc/pgp
michael@95 106
michael@95 107 # install program and manpage files
michael@95 108 %{l_shtool} install -c -s -m 755 \
michael@96 109 src/pgp $RPM_BUILD_ROOT%{l_prefix}/bin/pgp
michael@95 110 %{l_shtool} install -c -m 644 \
michael@96 111 doc/pgp.1 $RPM_BUILD_ROOT%{l_prefix}/man/man1/pgp.1
michael@95 112
michael@95 113 # install configuration, language, and help files
michael@95 114 %{l_shtool} install -c -m 644 \
michael@95 115 config.txt *.hlp doc/pgpdoc[12].txt \
michael@95 116 language.txt %{SOURCE language.idx} \
michael@96 117 $RPM_BUILD_ROOT%{l_prefix}/etc/pgp/
michael@95 118
michael@95 119 # determine installation files and mark configs
michael@95 120 %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
michael@95 121 %{l_files_std} \
michael@96 122 '%config %{l_prefix}/etc/pgp/config.txt'
michael@95 123
michael@95 124 %files -f files
michael@95 125
michael@95 126 %clean
michael@95 127 rm -rf $RPM_BUILD_ROOT
michael@95 128

mercurial