pgp2.spec 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131
  1. ##
  2. ## pgp2.spec -- OpenPKG RPM Specification
  3. ## Copyright (c) 2000-2003 Cable & Wireless Deutschland GmbH
  4. ## Copyright (c) 2000-2003 The OpenPKG Project <http://www.openpkg.org/>
  5. ## Copyright (c) 2000-2003 Ralf S. Engelschall <rse@engelschall.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. %define V_short 2.x
  26. %define V_long 2.6.3i
  27. %define V_strip 263
  28. # package information
  29. Name: pgp2
  30. Summary: Pretty Good Privacy
  31. URL: http://www.pgpi.org/
  32. Vendor: Philip Zimmerman
  33. Packager: The OpenPKG Project
  34. Distribution: OpenPKG [PLUS]
  35. Group: Cryptography
  36. License: GPL
  37. Version: %{V_long}
  38. Release: 20021122
  39. # list of sources
  40. Source0: ftp://ftp.pgpi.org/pub/pgp/%{V_short}/src/pgp%{V_strip}is.tar.gz
  41. Source1: language.idx
  42. Patch0: keygen.patch
  43. Patch1: system.patch
  44. # build information
  45. Prefix: %{l_prefix}
  46. BuildRoot: %{l_buildroot}
  47. BuildPreReq: OpenPKG, openpkg >= 20021120, gcc
  48. PreReq: OpenPKG, openpkg >= 20021120
  49. AutoReq: no
  50. AutoReqProv: no
  51. %description
  52. PGP (Pretty Good Privacy) is a public key encryption program originally
  53. written by Phil Zimmermann in 1991. This is version %{V_long}, considered
  54. a classic PGP by some and outdated by others. However, this version of PGP
  55. is absent of questionable security features implemented in more current
  56. releases. Because of this, some paranoid PGP users prefer this classic
  57. version. An article http://senderek.de/security/key-experiments.html
  58. explains the questionable security features of newer versions of PGP, and
  59. the reasons that PGP %{V_long} might be the most secure version to date.
  60. This version includes '4k' patch code from Rich WALES. It will not display
  61. warnings regarding RSA patent rights, and allows key generation and
  62. processing of up to 4096 bits in length. For more information, please see
  63. http://www.richw.org/pgp/263i-4k-patch.
  64. %prep
  65. # extract distribution
  66. %setup -c -n pgp-%{V_long}
  67. %{l_tar} -xf pgp%{V_strip}ii.tar
  68. %patch0 -p0
  69. %patch1 -p0
  70. # patch distribution
  71. chmod u+w src/fileio.h
  72. %{l_shtool} subst \
  73. -e 's;\/usr\/local\/lib\/pgp;%{l_prefix}\/etc\/pgp2;' \
  74. src/fileio.h
  75. %build
  76. # build program
  77. cd src
  78. CC="%{l_cc}"
  79. CFLAGS="%{l_cflags -O} -fno-strength-reduce"
  80. CFLAGS="$CFLAGS -DUNIX -DPORTABLE"
  81. case "%{l_target}" in
  82. sparc* ) CFLAGS="$CFLAGS -DHIGHFIRST" ;;
  83. *[3456x]86*) CFLAGS="$CFLAGS -DIDEA32" ;;
  84. esac
  85. case "%{l_target}" in
  86. *-freebsd* ) CFLAGS="$CFLAGS -DMAX_NAMELEN=255" ;;
  87. *-linux* ) CFLAGS="$CFLAGS -DLINUX" ;;
  88. *-solaris* ) CFLAGS="$CFLAGS -DSOLARIS" ;;
  89. esac
  90. %{l_make} %{l_mflags} \
  91. CC="$CC" CFLAGS="$CFLAGS" pgp
  92. %install
  93. rm -rf $RPM_BUILD_ROOT
  94. %{l_shtool} mkdir -f -p -m 755 \
  95. $RPM_BUILD_ROOT%{l_prefix}/bin \
  96. $RPM_BUILD_ROOT%{l_prefix}/man/man1 \
  97. $RPM_BUILD_ROOT%{l_prefix}/etc/pgp2
  98. # install program and manpage files
  99. %{l_shtool} install -c -s -m 755 \
  100. src/pgp $RPM_BUILD_ROOT%{l_prefix}/bin/pgp2
  101. %{l_shtool} install -c -m 644 \
  102. doc/pgp.1 $RPM_BUILD_ROOT%{l_prefix}/man/man1/pgp2.1
  103. # install configuration, language, and help files
  104. %{l_shtool} install -c -m 644 \
  105. config.txt *.hlp doc/pgpdoc[12].txt \
  106. language.txt %{SOURCE language.idx} \
  107. $RPM_BUILD_ROOT%{l_prefix}/etc/pgp2/
  108. # determine installation files and mark configs
  109. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
  110. %{l_files_std} \
  111. '%config %{l_prefix}/etc/pgp2/config.txt'
  112. %files -f files
  113. %clean
  114. rm -rf $RPM_BUILD_ROOT