pgp2/pgp2.spec

changeset 95
c15febc142b1
child 96
af66192d4e85
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/pgp2/pgp2.spec	Fri Jan 16 20:52:12 2009 +0100
     1.3 @@ -0,0 +1,128 @@
     1.4 +##
     1.5 +##  pgp2.spec -- OpenPKG RPM Specification
     1.6 +##  Copyright (c) 2000-2005 The OpenPKG Project <http://www.openpkg.org/>
     1.7 +##  Copyright (c) 2000-2005 Ralf S. Engelschall <rse@engelschall.com>
     1.8 +##  Copyright (c) 2000-2005 Cable & Wireless <http://www.cw.com/>
     1.9 +##
    1.10 +##  Permission to use, copy, modify, and distribute this software for
    1.11 +##  any purpose with or without fee is hereby granted, provided that
    1.12 +##  the above copyright notice and this permission notice appear in all
    1.13 +##  copies.
    1.14 +##
    1.15 +##  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
    1.16 +##  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
    1.17 +##  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
    1.18 +##  IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
    1.19 +##  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
    1.20 +##  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
    1.21 +##  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
    1.22 +##  USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
    1.23 +##  ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
    1.24 +##  OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
    1.25 +##  OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
    1.26 +##  SUCH DAMAGE.
    1.27 +##
    1.28 +
    1.29 +#   package version
    1.30 +%define       V_short 2.x
    1.31 +%define       V_long  2.6.3i
    1.32 +%define       V_strip 263
    1.33 +
    1.34 +#   package information
    1.35 +Name:         pgp2
    1.36 +Summary:      Pretty Good Privacy
    1.37 +URL:          http://www.pgpi.org/
    1.38 +Vendor:       Philip Zimmerman
    1.39 +Packager:     The OpenPKG Project
    1.40 +Distribution: OpenPKG [PLUS]
    1.41 +Group:        Cryptography
    1.42 +License:      GPL
    1.43 +Version:      %{V_long}
    1.44 +Release:      20040916
    1.45 +
    1.46 +#   list of sources
    1.47 +Source0:      ftp://ftp.pgpi.org/pub/pgp/%{V_short}/src/pgp%{V_strip}is.tar.gz
    1.48 +Source1:      language.idx
    1.49 +Patch0:       pgp2.patch
    1.50 +
    1.51 +#   build information
    1.52 +Prefix:       %{l_prefix}
    1.53 +BuildRoot:    %{l_buildroot}
    1.54 +BuildPreReq:  OpenPKG, openpkg >= 20030909, gcc
    1.55 +PreReq:       OpenPKG, openpkg >= 20030909
    1.56 +AutoReq:      no
    1.57 +AutoReqProv:  no
    1.58 +
    1.59 +%description
    1.60 +    PGP (Pretty Good Privacy) is a public key encryption program originally
    1.61 +    written by Phil Zimmermann in 1991. This is version %{V_long}, considered
    1.62 +    a classic PGP by some and outdated by others. However, this version of PGP
    1.63 +    is absent of questionable security features implemented in more current
    1.64 +    releases. Because of this, some paranoid PGP users prefer this classic
    1.65 +    version. An article http://senderek.de/security/key-experiments.html
    1.66 +    explains the questionable security features of newer versions of PGP, and
    1.67 +    the reasons that PGP %{V_long} might be the most secure version to date.
    1.68 +
    1.69 +    This version includes '4k' patch code from Rich WALES. It will not display
    1.70 +    warnings regarding RSA patent rights, and allows key generation and
    1.71 +    processing of up to 4096 bits in length. For more information, please see
    1.72 +    http://www.richw.org/pgp/263i-4k-patch.
    1.73 +
    1.74 +%prep
    1.75 +    #   extract distribution
    1.76 +    %setup -c -n pgp-%{V_long}
    1.77 +    %{l_tar} -xf pgp%{V_strip}ii.tar
    1.78 +    %patch -p0
    1.79 +
    1.80 +    #   patch distribution
    1.81 +    %{l_shtool} subst \
    1.82 +        -e 's;\/usr\/local\/lib\/pgp;%{l_prefix}\/etc\/pgp2;' \
    1.83 +        src/fileio.h
    1.84 +
    1.85 +%build
    1.86 +    #   build program
    1.87 +    cd src
    1.88 +    CC="%{l_cc}"
    1.89 +    CFLAGS="%{l_cflags -O} -fno-strength-reduce"
    1.90 +    CFLAGS="$CFLAGS -DUNIX -DPORTABLE"
    1.91 +    case "%{l_platform -t}" in
    1.92 +        sparc*     ) CFLAGS="$CFLAGS -DHIGHFIRST" ;;
    1.93 +        i?86*      ) CFLAGS="$CFLAGS -DIDEA32"    ;;
    1.94 +    esac
    1.95 +    case "%{l_platform -t}" in
    1.96 +        *-freebsd* ) CFLAGS="$CFLAGS -DMAX_NAMELEN=255" ;;
    1.97 +        *-linux*   ) CFLAGS="$CFLAGS -DLINUX"           ;;
    1.98 +        *-sunos*   ) CFLAGS="$CFLAGS -DSOLARIS"         ;;
    1.99 +    esac
   1.100 +    %{l_make} %{l_mflags} \
   1.101 +        CC="$CC" CFLAGS="$CFLAGS" pgp
   1.102 +
   1.103 +%install
   1.104 +    rm -rf $RPM_BUILD_ROOT
   1.105 +    %{l_shtool} mkdir -f -p -m 755 \
   1.106 +        $RPM_BUILD_ROOT%{l_prefix}/bin \
   1.107 +        $RPM_BUILD_ROOT%{l_prefix}/man/man1 \
   1.108 +        $RPM_BUILD_ROOT%{l_prefix}/etc/pgp2
   1.109 +
   1.110 +    #   install program and manpage files
   1.111 +    %{l_shtool} install -c -s -m 755 \
   1.112 +        src/pgp $RPM_BUILD_ROOT%{l_prefix}/bin/pgp2
   1.113 +    %{l_shtool} install -c -m 644 \
   1.114 +        doc/pgp.1 $RPM_BUILD_ROOT%{l_prefix}/man/man1/pgp2.1
   1.115 +
   1.116 +    #   install configuration, language, and help files
   1.117 +    %{l_shtool} install -c -m 644 \
   1.118 +        config.txt *.hlp doc/pgpdoc[12].txt \
   1.119 +        language.txt %{SOURCE language.idx} \
   1.120 +        $RPM_BUILD_ROOT%{l_prefix}/etc/pgp2/
   1.121 +
   1.122 +    #   determine installation files and mark configs
   1.123 +    %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
   1.124 +        %{l_files_std} \
   1.125 +        '%config %{l_prefix}/etc/pgp2/config.txt'
   1.126 +
   1.127 +%files -f files
   1.128 +
   1.129 +%clean
   1.130 +    rm -rf $RPM_BUILD_ROOT
   1.131 +

mercurial