|
|
@@ -33,7 +33,7 @@ Summary: Preety Good Privacy
|
|
|
URL: http://www.pgpi.org/
|
|
|
Vendor: Philip Zimmerman
|
|
|
Packager: The OpenPKG Project
|
|
|
-Distribution: OpenPKG [REL]
|
|
|
+Distribution: OpenPKG [EXP]
|
|
|
Group: Cryptography
|
|
|
License: GPL
|
|
|
Version: %{V_long}
|
|
|
@@ -45,7 +45,7 @@ Source0: ftp://ftp.pgpi.org/pub/pgp/%{V_short}/src/pgp%{V_strip}is.tar.gz
|
|
|
# build information
|
|
|
Prefix: %{l_prefix}
|
|
|
BuildRoot: %{l_buildroot}
|
|
|
-BuildPreReq: OpenPKG, openpkg >= 20020206, tar
|
|
|
+BuildPreReq: OpenPKG, openpkg >= 20020206, tar, gcc
|
|
|
PreReq: OpenPKG, openpkg >= 20020206
|
|
|
AutoReq: no
|
|
|
AutoReqProv: no
|
|
|
@@ -61,46 +61,33 @@ AutoReqProv: no
|
|
|
the reasons that PGP %{V_long} might be the most secure version to date.
|
|
|
|
|
|
%prep
|
|
|
+ # extract distribution
|
|
|
%setup -c -n pgp-%{V_long}
|
|
|
%{l_prefix}/bin/tar -xf pgp%{V_strip}ii.tar
|
|
|
+
|
|
|
+ # patch distribution
|
|
|
chmod u+w src/fileio.h
|
|
|
- %{l_shtool} subst -e 's;\/usr\/local\/lib\/pgp;%{l_prefix}\/etc\/pgp2;' src/fileio.h
|
|
|
+ %{l_shtool} subst \
|
|
|
+ -e 's;\/usr\/local\/lib\/pgp;%{l_prefix}\/etc\/pgp2;' \
|
|
|
+ src/fileio.h
|
|
|
|
|
|
%build
|
|
|
+ # build program
|
|
|
cd src
|
|
|
- CC="%{l_cc}" CFLAGS="%{l_cflags -O}"
|
|
|
- CFLAGS="%{l_cflags -O}"
|
|
|
+ CC="%{l_cc}"
|
|
|
+ CFLAGS="%{l_cflags -O} -fno-strength-reduce"
|
|
|
+ CFLAGS="$CFLAGS -DUNIX -DPORTABLE"
|
|
|
case "%{l_target}" in
|
|
|
- *-freebsd* )
|
|
|
- if ( %{l_cc} --version | egrep -i -e "gcc" ); then
|
|
|
- CFLAGS="$CFLAGS -pthread"
|
|
|
- fi
|
|
|
- ;;
|
|
|
- *-solaris* )
|
|
|
- if ( %{l_cc} --version | egrep -i -e "gcc" ); then
|
|
|
- CFLAGS="$CFLAGS -pthreads"
|
|
|
- fi
|
|
|
- ;;
|
|
|
+ sparc* ) CFLAGS="$CFLAGS -DHIGHFIRST" ;;
|
|
|
+ *[3456x]86*) CFLAGS="$CFLAGS -DIDEA32" ;;
|
|
|
esac
|
|
|
case "%{l_target}" in
|
|
|
- *-freebsd* )
|
|
|
- OS=freebsd
|
|
|
- ;;
|
|
|
- *-linux* )
|
|
|
- OS=linux
|
|
|
- ;;
|
|
|
- *ix86-solaris* )
|
|
|
- OS=solx86gcc
|
|
|
- ;;
|
|
|
- *-solaris* )
|
|
|
- OS=sun4gcc
|
|
|
- ;;
|
|
|
- *)
|
|
|
- echo "Unsupported platform" 1>&2
|
|
|
- exit 1
|
|
|
- ;;
|
|
|
+ *-freebsd* ) CFLAGS="$CFLAGS -DMAX_NAMELEN=255" ;;
|
|
|
+ *-linux* ) CFLAGS="$CFLAGS -DLINUX" ;;
|
|
|
+ *-solaris* ) CFLAGS="$CFLAGS -DSOLARIS" ;;
|
|
|
esac
|
|
|
- %{l_make} %{l_mflags} $OS
|
|
|
+ %{l_make} %{l_mflags} \
|
|
|
+ CC="$CC" CFLAGS="$CFLAGS" pgp
|
|
|
|
|
|
%install
|
|
|
rm -rf $RPM_BUILD_ROOT
|
|
|
@@ -111,13 +98,14 @@ AutoReqProv: no
|
|
|
|
|
|
# install program and manpage files
|
|
|
%{l_shtool} install -c -s -m 755 \
|
|
|
- src/pgp $RPM_BUILD_ROOT%{l_prefix}/bin/
|
|
|
+ src/pgp $RPM_BUILD_ROOT%{l_prefix}/bin/pgp2
|
|
|
%{l_shtool} install -c -m 644 \
|
|
|
- doc/pgp.1 $RPM_BUILD_ROOT%{l_prefix}/man/man1/
|
|
|
+ doc/pgp.1 $RPM_BUILD_ROOT%{l_prefix}/man/man1/pgp2.1
|
|
|
|
|
|
# install configuration, language, and help files
|
|
|
%{l_shtool} install -c -m 644 \
|
|
|
- config.txt language.txt *.hlp $RPM_BUILD_ROOT%{l_prefix}/etc/pgp2/
|
|
|
+ config.txt language.txt *.hlp doc/pgpdoc[12].txt \
|
|
|
+ $RPM_BUILD_ROOT%{l_prefix}/etc/pgp2/
|
|
|
|
|
|
# determine installation files and mark configs
|
|
|
%{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
|