elm.spec 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  1. ##
  2. ## elm.spec -- OpenPKG RPM Specification
  3. ## Copyright (c) 2000-2004 The OpenPKG Project <http://www.openpkg.org/>
  4. ## Copyright (c) 2000-2004 Ralf S. Engelschall <rse@engelschall.com>
  5. ## Copyright (c) 2000-2004 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_base 2.4
  27. %define V_me 117
  28. # package information
  29. Name: elm
  30. Summary: Electronic Mail
  31. URL: http://www.ozone.fmi.fi/KEH/
  32. Vendor: Dave Taylor et al.
  33. Packager: The OpenPKG Project
  34. Distribution: OpenPKG
  35. Class: PLUS
  36. Group: Mail
  37. License: ELM License
  38. Version: %{V_base}.%{V_me}
  39. Release: 20040702
  40. # list of sources
  41. Source0: http://www.ozone.fmi.fi/KEH/elm-%{V_base}ME+%{V_me}.tar.gz
  42. # build information
  43. Prefix: %{l_prefix}
  44. BuildRoot: %{l_buildroot}
  45. BuildPreReq: OpenPKG, openpkg >= 20040130
  46. PreReq: OpenPKG, openpkg >= 20040130
  47. AutoReq: no
  48. AutoReqProv: no
  49. %description
  50. Elm (Electronic Mail) is the most popular Mail User Agent (MUA) from
  51. the good USENET days. It contains enhanced MIME and character set
  52. support, can read mail from POP or IMAP folders and can pass mail
  53. to the PGP or GPG programs. It also includes modules for TLS/SSL,
  54. iconv, and SMTP.
  55. %track
  56. prog elm = {
  57. version = %{V_base}ME+%{V_me}
  58. url = http://www.ozone.fmi.fi/KEH/
  59. regex = elm-(2.4ME\+1\d+S?)\.tar\.gz
  60. }
  61. %prep
  62. %setup -q -n elm%{V_base}.ME+.%{V_me}
  63. %build
  64. # configure program
  65. %{l_shtool} subst \
  66. -e 's;d_shared="$define";d_shared="$undef";g' \
  67. -e 's;install_prefix/var/stage-$package;install_prefix/var/elm;g' \
  68. -e 's;install_prefix/lib;install_prefix/lib/elm;g' \
  69. -e 's;shlib="$install_prefix/$libdirname";shlib="$install_prefix/lib/elm";g' \
  70. Configure
  71. export cc="%{l_cc}"
  72. export optimize="%{l_cflags -O}"
  73. ./Configure -d -b -P%{l_prefix}
  74. # build program
  75. %{l_make} %{l_mflags -O}
  76. %install
  77. # install program
  78. rm -rf $RPM_BUILD_ROOT
  79. %{l_shtool} mkdir -f -p -m 755 \
  80. $RPM_BUILD_ROOT%{l_prefix}/lib/elm
  81. %{l_shtool} subst \
  82. -e "s;\\(bin/elmregister master\\);\1 -F %{l_prefix}/lib/elm.filelist -R $RPM_BUILD_ROOT;" \
  83. -e 's;\(bin/elmregister replay\);#\1;' \
  84. -e 's;\(bin/elmregister unstage\);#\1;' \
  85. Makefile
  86. %{l_make} %{l_mflags} install
  87. # strip down installation
  88. rm -f $RPM_BUILD_ROOT%{l_prefix}/lib/elm/elm.filelist
  89. rm -rf $RPM_BUILD_ROOT%{l_prefix}/lib/elm/elm.map.*
  90. rm -rf $RPM_BUILD_ROOT%{l_prefix}/man/cat1
  91. strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true
  92. strip $RPM_BUILD_ROOT%{l_prefix}/lib/elm/* >/dev/null 2>&1 || true
  93. # determine installation files
  94. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
  95. %files -f files
  96. %clean
  97. rm -rf $RPM_BUILD_ROOT