pine.spec 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144
  1. ##
  2. ## pine.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 version
  26. %define V_here 4.58L
  27. %define V_real 4.58
  28. # package information
  29. Name: pine
  30. Summary: Pine - a Programm for Internet News & Email
  31. URL: http://www.washington.edu/pine/
  32. Vendor: University of Washington
  33. Packager: The OpenPKG Project
  34. Distribution: OpenPKG [JUNK]
  35. Group: Mail
  36. License: Free but restricted
  37. Version: %{V_here}
  38. Release: 20030919
  39. # package options
  40. %option with_ssl no
  41. # list of sources
  42. Source0: ftp://ftp.cac.washington.edu/pine/pine%{V_real}.tar.bz2
  43. Source1: pine.conf.fixed
  44. Source2: pine.conf
  45. # build information
  46. Prefix: %{l_prefix}
  47. BuildRoot: %{l_buildroot}
  48. BuildPreReq: OpenPKG, openpkg >= 20030909, MTA, make, gcc
  49. PreReq: OpenPKG, openpkg >= 20030909, MTA
  50. %if "%{with_ssl}" == "yes"
  51. BuildPreReq: openssl
  52. PreReq: openssl
  53. %endif
  54. AutoReq: no
  55. AutoReqProv: no
  56. %description
  57. Pine - a Program for Internet News & Email - is a tool for reading,
  58. sending, and managing electronic messages. Pine was developed by
  59. Computing & Communications at the University of Washington. Though
  60. originally designed for inexperienced email users, Pine has evolved
  61. to support many advanced features, and an ever-growing number of
  62. configuration and personal-preference options.
  63. %prep
  64. %setup -q -n pine%{V_real}
  65. %build
  66. # determine build platform
  67. OS=""
  68. OS_DEP_FILE=""
  69. case "%{l_platform -t}" in
  70. *-freebsd* ) OS="bsf"; OS_DEP_FILE="pine/osdep/os-bsf.h" ;;
  71. *-linux* ) OS="slx"; OS_DEP_FILE="pine/osdep/os-lnx.h" ;;
  72. *-sunos5.* ) OS="gs5"; OS_DEP_FILE="pine/osdep/os-sol.h" ;;
  73. *)
  74. echo "Sorry, unsupported architecture '%{l_platform -t}'" |\
  75. %{l_rpmtool} msg -b -t error 1>&2
  76. exit 1
  77. ;;
  78. esac
  79. # adjust paths
  80. PINE_CONF_FIXED="%{l_prefix}/etc/pine/pine.conf.fixed"
  81. PINE_CONF="%{l_prefix}/etc/pine/pine.conf"
  82. SENDMAIL="%{l_prefix}/sbin/sendmail"
  83. %{l_shtool} subst \
  84. -e "s;^\(#define SYSTEM_PINERC_FIXED[ ]\).*$;\1 \"$PINE_CONF_FIXED\";" \
  85. -e "s;^\(#define SYSTEM_PINERC[ ]\).*$;\1 \"$PINE_CONF\";" \
  86. -e "s;^\(#define SENDMAIL[ ]\).*$;\1 \"$SENDMAIL\";" \
  87. $OS_DEP_FILE
  88. # clean up before building Pine
  89. sh ./build clean
  90. # build Pine
  91. sh ./build \
  92. CC="%{l_cc}" \
  93. EXTRACFLAGS="%{l_cflags -O}" \
  94. EXTRALDFLAGS="%{l_ldflags}" \
  95. NOLDAP \
  96. %if "%{with_ssl}" == "yes"
  97. SSLDIR="%{l_prefix}" \
  98. SSLTYPE="unix" \
  99. %else
  100. NOSSL \
  101. %endif
  102. $OS
  103. %install
  104. rm -rf $RPM_BUILD_ROOT
  105. # create directories and install files
  106. %{l_shtool} mkdir -f -p -m 755 \
  107. $RPM_BUILD_ROOT%{l_prefix}/bin \
  108. $RPM_BUILD_ROOT%{l_prefix}/etc/pine \
  109. $RPM_BUILD_ROOT%{l_prefix}/man/man1
  110. %{l_shtool} install -c -s -m 755 \
  111. bin/pine \
  112. $RPM_BUILD_ROOT%{l_prefix}/bin/
  113. %{l_shtool} install -c -m 644 %{l_value -s -a} \
  114. %{SOURCE pine.conf.fixed} \
  115. %{SOURCE pine.conf} \
  116. $RPM_BUILD_ROOT%{l_prefix}/etc/pine/
  117. %{l_shtool} install -c -m 644 \
  118. doc/pine.1 \
  119. $RPM_BUILD_ROOT%{l_prefix}/man/man1/
  120. # determine installation files
  121. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
  122. %{l_files_std} \
  123. '%config %{l_prefix}/etc/pine/*'
  124. %files -f files
  125. %clean
  126. rm -rf $RPM_BUILD_ROOT