procmail.spec 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  1. ##
  2. ## procmail.spec -- OpenPKG RPM Specification
  3. ## Copyright (c) 2000-2001 Cable & Wireless Deutschland GmbH
  4. ## Copyright (c) 2000-2001 Ralf S. Engelschall <rse@engelschall.com>
  5. ##
  6. ## Permission to use, copy, modify, and distribute this software for
  7. ## any purpose with or without fee is hereby granted, provided that
  8. ## the above copyright notice and this permission notice appear in all
  9. ## copies.
  10. ##
  11. ## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  12. ## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
  13. ## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
  14. ## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
  15. ## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  16. ## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  17. ## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
  18. ## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
  19. ## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  20. ## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
  21. ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  22. ## SUCH DAMAGE.
  23. ##
  24. # package information
  25. Name: procmail
  26. Summary: Local Mail Filtering and Delivering Tool
  27. Group: Mail
  28. URL: http://www.procmail.org/
  29. Vendor: Stephen R. van den Berg
  30. Packager: rse@openpkg.org
  31. Distribution: OpenPKG
  32. License: GPL
  33. Version: 3.22
  34. Release: 2
  35. # list of sources
  36. Source0: ftp://ftp.procmail.org/pub/procmail/procmail-%{version}.tar.gz
  37. # build information
  38. Prefix: %{l_prefix}
  39. BuildRoot: %{l_buildroot}
  40. BuildPreReq: OpenPKG, openpkg >= 0.9-33
  41. PreReq: OpenPKG, openpkg >= 0.9-33
  42. AutoReq: no
  43. AutoReqProv: no
  44. %description
  45. Procmail can be used to create mail-servers, mailing lists, sort
  46. your incoming mail into separate folders/files (real convenient
  47. when subscribing to one or more mailing lists or for prioritising
  48. your mail), preprocess your mail, start any programs upon mail
  49. arrival (e.g. to generate different chimes on your workstation for
  50. different types of mail) or selectively forward certain incoming
  51. mail automatically to someone.
  52. %prep
  53. %setup -q
  54. %build
  55. %{l_rpmtool} subst \
  56. 's;^\(BASENAME[^=]*=\).*;\1 %{l_prefix};' \
  57. -- Makefile
  58. %{l_rpmtool} subst \
  59. 's;^/\*\(#define NO_fcntl_LOCK\);\1;' \
  60. 's;\(#define.*ETCRC[^"]"\)[^"]*\(".*\);\1%{l_prefix}/etc/sendmail/procmailrc\2;' \
  61. 's;\(#define.*ETCRCS[^"]"\)[^"]*\(".*\);\1%{l_prefix}/etc/sendmail/\2;' \
  62. -- config.h
  63. ( unset LD_LIBRARY_PATH 2>/dev/null || true
  64. dirlist=""
  65. for dir in "$HOME/tmp" /tmp $RPM_SOURCE_DIR $RPM_BUILD_DIR; do
  66. if [ -d $dir ]; then
  67. dirlist="$dirlist $dir"
  68. fi
  69. done
  70. echo "$dirlist" |\
  71. %{l_make} %{l_mflags} autoconf.h CC="%{l_cc}" CFLAGS="%{l_cflags -O}"
  72. )
  73. %{l_rpmtool} subst \
  74. 's;\(#define.*SENDMAIL[^"]*"\)[^"]*\(".*\);\1%{l_prefix}/sbin/sendmail\2;' \
  75. -- autoconf.h
  76. %{l_make} %{l_mflags} \
  77. CC="%{l_cc}" \
  78. CFLAGS="%{l_cflags -O}"
  79. %install
  80. rm -rf $RPM_BUILD_ROOT
  81. %{l_shtool} mkdir -f -p -m 755 \
  82. $RPM_BUILD_ROOT%{l_prefix}/bin \
  83. $RPM_BUILD_ROOT%{l_prefix}/man/man1 \
  84. $RPM_BUILD_ROOT%{l_prefix}/man/man5
  85. %{l_shtool} install -c -s \
  86. new/procmail new/lockfile new/formail \
  87. $RPM_BUILD_ROOT%{l_prefix}/bin/
  88. %{l_shtool} install -c -m 644 \
  89. new/*.1 $RPM_BUILD_ROOT%{l_prefix}/man/man1/
  90. %{l_shtool} install -c -m 644 \
  91. new/*.5 $RPM_BUILD_ROOT%{l_prefix}/man/man5/
  92. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
  93. %{l_files_std} \
  94. '%attr(6755,root,mail) %{l_prefix}/bin/procmail' \
  95. '%attr(2755,%{l_fsgrp},mail) %{l_prefix}/bin/lockfile' \
  96. %files -f files
  97. %clean
  98. rm -rf $RPM_BUILD_ROOT