postgrey.spec 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127
  1. ##
  2. ## postgrey.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 information
  26. Name: postgrey
  27. Summary: Postfix Greylisting Daemon
  28. URL: http://isg.ee.ethz.ch/tools/postgrey/
  29. Vendor: David Schweikert
  30. Packager: The OpenPKG Project
  31. Distribution: OpenPKG
  32. Class: EVAL
  33. Group: Mail
  34. License: GPL
  35. Version: 1.14
  36. Release: 20040712
  37. # list of sources
  38. Source0: http://isg.ee.ethz.ch/tools/postgrey/pub/postgrey-%{version}.tar.gz
  39. Source1: rc.postgrey
  40. # build information
  41. Prefix: %{l_prefix}
  42. BuildRoot: %{l_buildroot}
  43. BuildPreReq: OpenPKG, openpkg >= 20040130
  44. PreReq: OpenPKG, openpkg >= 20040130
  45. BuildPreReq: perl
  46. PreReq: perl, perl-sys, perl-net, perl-db
  47. AutoReq: no
  48. AutoReqProv: no
  49. %description
  50. Postgrey is a Postfix MTA policy server implementing Greylisting.
  51. Related to whitelists and blacklists, a greylist indicates those
  52. emails (originating from unknown IPs) which are rejected with a
  53. "try again later" message. The email in question will be delayed
  54. until the sending MTA tries again, but this is where spam loses
  55. out. Most spam is not sent out using RFC compliant MTAs, and so
  56. the spamming software will not "try again later".
  57. %track
  58. prog postgrey = {
  59. version = %{version}
  60. url = http://isg.ee.ethz.ch/tools/postgrey/pub/
  61. regex = postgrey-(__VER__)\.tar\.gz
  62. }
  63. %prep
  64. %setup -q
  65. %build
  66. # build manual page
  67. pod2man postgrey >postgrey.8
  68. pod2man contrib/postgreyreport >contrib/postgreyreport.8
  69. # build empty recipient list
  70. echo "" >postgrey_recipient_access
  71. %install
  72. # create installation hierarchy
  73. rm -rf $RPM_BUILD_ROOT
  74. %{l_shtool} mkdir -f -p -m 755 \
  75. $RPM_BUILD_ROOT%{l_prefix}/sbin \
  76. $RPM_BUILD_ROOT%{l_prefix}/man/man8 \
  77. $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d \
  78. $RPM_BUILD_ROOT%{l_prefix}/etc/postgrey \
  79. $RPM_BUILD_ROOT%{l_prefix}/var/postgrey
  80. # install programs and manual pages
  81. %{l_shtool} install -c -m 755 \
  82. -e 's;#!/usr/bin/perl;#!%{l_prefix}/bin/perl;g' \
  83. postgrey $RPM_BUILD_ROOT%{l_prefix}/sbin/
  84. %{l_shtool} install -c -m 755 \
  85. -e 's;#!/usr/bin/perl;#!%{l_prefix}/bin/perl;g' \
  86. -e 's;/var/spool/postfix/postgrey;%{l_prefix}/var/postgrey;' \
  87. contrib/postgreyreport $RPM_BUILD_ROOT%{l_prefix}/sbin/
  88. %{l_shtool} install -c -m 644 \
  89. postgrey.8 contrib/postgreyreport.8 \
  90. $RPM_BUILD_ROOT%{l_prefix}/man/man8/
  91. # install configuration files
  92. %{l_shtool} install -c -m 644 \
  93. postgrey_whitelist_clients postgrey_whitelist_recipients \
  94. $RPM_BUILD_ROOT%{l_prefix}/etc/postgrey/
  95. %{l_shtool} install -c -m 644 \
  96. postgrey_recipient_access \
  97. $RPM_BUILD_ROOT%{l_prefix}/etc/postgrey/
  98. # install run-command script
  99. %{l_shtool} mkdir -f -p -m 755 \
  100. $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d
  101. %{l_shtool} install -c -m 755 %{l_value -s -a} \
  102. %{SOURCE rc.postgrey} $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d/
  103. # determine installation files
  104. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
  105. %{l_files_std} \
  106. '%config %{l_prefix}/etc/postgrey/*' \
  107. '%attr(-,%{l_rusr},%{l_rgrp}) %{l_prefix}/var/postgrey'
  108. %files -f files
  109. %clean
  110. rm -rf $RPM_BUILD_ROOT