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