pgp.spec 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. ##
  2. ## pgp.spec -- OpenPKG RPM Specification
  3. ## Copyright (c) 2000-2003 The OpenPKG Project <http://www.openpkg.org/>
  4. ## Copyright (c) 2000-2003 Ralf S. Engelschall <rse@engelschall.com>
  5. ## Copyright (c) 2000-2003 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. # package versions
  26. %define V_short 6.5
  27. %define V_long 6.5.8
  28. %define V_strip 658
  29. # package information
  30. Name: pgp
  31. Summary: Pretty Good Privacy
  32. URL: http://www.pgpi.org/
  33. Vendor: Philip Zimmerman
  34. Packager: The OpenPKG Project
  35. Distribution: OpenPKG [BASE]
  36. Group: Cryptography
  37. License: GPL
  38. Version: %{V_long}
  39. Release: 20030730
  40. # list of sources
  41. Source0: ftp://ftp.pgpi.org/pub/pgp/%{V_short}/%{V_long}/pgpsrc%{V_strip}unix.tar.gz
  42. Patch0: pgp.patch
  43. # build information
  44. Prefix: %{l_prefix}
  45. BuildRoot: %{l_buildroot}
  46. BuildPreReq: OpenPKG, openpkg >= 20021120, make
  47. PreReq: OpenPKG, openpkg >= 20021120
  48. AutoReq: no
  49. AutoReqProv: no
  50. %description
  51. PGP (Pretty Good Privacy) is a public key encryption program
  52. originally written by Phil Zimmermann in 1991.
  53. %prep
  54. %setup -c -n pgp-%{V_long}
  55. rm -rf pgpsrc pgp-%{V_long}
  56. %{l_gzip} -d -c %{SOURCE pgpsrc%{V_strip}unix.tar.gz} | %{l_tar} xf -
  57. %{l_gzip} -d -c pgpsrc%{V_strip}unix.tar.gz | %{l_tar} xf -
  58. cd pgpsrc
  59. %patch -p0
  60. %build
  61. cd pgpsrc
  62. ( cd libs/pfl
  63. CC="%{l_cc}" CFLAGS="%{l_cflags -O}" ./configure
  64. %{l_make} %{l_mflags} OPT="%{l_cflags -O}" DEBUG=0
  65. ) || exit $?
  66. ( cd libs/pgpcdk
  67. CC="%{l_cc}" CFLAGS="%{l_cflags -O}" ./configure
  68. %{l_make} %{l_mflags} headers
  69. %{l_make} %{l_mflags} OPT="%{l_cflags -O}" DEBUG=0
  70. ) || exit $?
  71. ( cd clients/pgp/shared
  72. CC="%{l_cc}" CFLAGS="%{l_cflags -O}" ./configure
  73. %{l_make} %{l_mflags} OPT="%{l_cflags -O}" DEBUG=0
  74. ) || exit $?
  75. ( cd clients/pgp/cmdline
  76. CFLAGS="%{l_cflags -O}"
  77. case "%{l_target}" in
  78. *-freebsd* ) CFLAGS="$CFLAGS -pthread" ;;
  79. esac
  80. CC="%{l_cc}" CFLAGS="$CFLAGS" LIBS="$LIBS" ./configure
  81. %{l_make} %{l_mflags} OPT="%{l_cflags -O}" DEBUG=0
  82. ) || exit $?
  83. %install
  84. rm -rf $RPM_BUILD_ROOT
  85. %{l_shtool} mkdir -f -p -m 755 \
  86. $RPM_BUILD_ROOT%{l_prefix}/bin \
  87. $RPM_BUILD_ROOT%{l_prefix}/man/man1
  88. ( cd pgpsrc/clients/pgp/cmdline
  89. %{l_shtool} install -c -s -m 755 \
  90. pgp $RPM_BUILD_ROOT%{l_prefix}/bin/
  91. %{l_shtool} install -c -m 644 \
  92. packaging/pgp-*/man/man1/pgp.1 \
  93. $RPM_BUILD_ROOT%{l_prefix}/man/man1/
  94. ) || exit $?
  95. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
  96. %files -f files
  97. %clean
  98. rm -rf $RPM_BUILD_ROOT