procmail.spec 4.1 KB

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