procmail.spec 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  1. ##
  2. ## procmail.spec -- OpenPKG RPM Specification
  3. ## Copyright (c) 2000-2001 Cable & Wireless Deutschland GmbH
  4. ## Copyright (c) 2000-2001 The OpenPKG Project <http://www.openpkg.org/>
  5. ## Copyright (c) 2000-2001 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. # package information
  26. Name: procmail
  27. Summary: Local Mail Filtering and Delivering Tool
  28. URL: http://www.procmail.org/
  29. Vendor: Stephen R. van den Berg
  30. Packager: The OpenPKG Project
  31. Distribution: OpenPKG [REL]
  32. Group: Mail
  33. License: GPL
  34. Version: 3.22
  35. Release: 20011201.0
  36. # list of sources
  37. Source0: ftp://ftp.procmail.org/pub/procmail/procmail-%{version}.tar.gz
  38. Source1: procmailrc
  39. # build information
  40. Prefix: %{l_prefix}
  41. BuildRoot: %{l_buildroot}
  42. BuildPreReq: OpenPKG, openpkg >= 20011126.0
  43. PreReq: OpenPKG, openpkg >= 20011126.0
  44. AutoReq: no
  45. AutoReqProv: no
  46. %description
  47. Procmail can be used to create mail-servers, mailing lists, sort
  48. your incoming mail into separate folders/files (real convenient
  49. when subscribing to one or more mailing lists or for prioritising
  50. your mail), preprocess your mail, start any programs upon mail
  51. arrival (e.g. to generate different chimes on your workstation for
  52. different types of mail) or selectively forward certain incoming
  53. mail automatically to someone.
  54. %prep
  55. %setup -q
  56. %build
  57. %{l_rpmtool} subst \
  58. 's;^\(BASENAME[^=]*=\).*;\1 %{l_prefix};' \
  59. -- Makefile
  60. %{l_rpmtool} subst \
  61. 's;^/\*\(#define NO_fcntl_LOCK\);\1;' \
  62. 's;\(#define.*ETCRC[^"]"\)[^"]*\(".*\);\1%{l_prefix}/etc/procmail/procmailrc\2;' \
  63. 's;\(#define.*ETCRCS[^"]"\)[^"]*\(".*\);\1%{l_prefix}/etc/procmail/\2;' \
  64. -- config.h
  65. ( unset LD_LIBRARY_PATH 2>/dev/null || true
  66. dirlist=""
  67. for dir in "$HOME/tmp" /tmp $RPM_SOURCE_DIR $RPM_BUILD_DIR; do
  68. if [ -d $dir ]; then
  69. dirlist="$dirlist $dir"
  70. fi
  71. done
  72. echo "$dirlist" |\
  73. %{l_make} %{l_mflags} autoconf.h CC="%{l_cc}" CFLAGS="%{l_cflags -O}"
  74. )
  75. %{l_rpmtool} subst \
  76. 's;\(#define.*SENDMAIL[^"]*"\)[^"]*\(".*\);\1%{l_prefix}/sbin/sendmail\2;' \
  77. -- autoconf.h
  78. %{l_make} %{l_mflags} \
  79. CC="%{l_cc}" \
  80. CFLAGS="%{l_cflags -O}"
  81. %install
  82. rm -rf $RPM_BUILD_ROOT
  83. %{l_shtool} mkdir -f -p -m 755 \
  84. $RPM_BUILD_ROOT%{l_prefix}/bin \
  85. $RPM_BUILD_ROOT%{l_prefix}/etc/procmail \
  86. $RPM_BUILD_ROOT%{l_prefix}/man/man1 \
  87. $RPM_BUILD_ROOT%{l_prefix}/man/man5
  88. %{l_shtool} install -c -s \
  89. new/procmail new/lockfile new/formail \
  90. $RPM_BUILD_ROOT%{l_prefix}/bin/
  91. %{l_shtool} install -c -m 644 \
  92. new/*.1 $RPM_BUILD_ROOT%{l_prefix}/man/man1/
  93. %{l_shtool} install -c -m 644 \
  94. new/*.5 $RPM_BUILD_ROOT%{l_prefix}/man/man5/
  95. %{l_shtool} install -c -m 644 \
  96. -e 's;@l_prefix@;%{l_prefix};g' \
  97. %{SOURCE procmailrc} $RPM_BUILD_ROOT%{l_prefix}/etc/procmail/
  98. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
  99. %{l_files_std} \
  100. '%attr(6755,root,mail) %{l_prefix}/bin/procmail' \
  101. '%attr(2755,%{l_fsgrp},mail) %{l_prefix}/bin/lockfile' \
  102. %files -f files
  103. %clean
  104. rm -rf $RPM_BUILD_ROOT