postgrey.spec 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121
  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.4
  36. Release: 20040525
  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. # build empty recipient list
  69. echo "" >postgrey_recipient_access
  70. %install
  71. # create installation hierarchy
  72. rm -rf $RPM_BUILD_ROOT
  73. %{l_shtool} mkdir -f -p -m 755 \
  74. $RPM_BUILD_ROOT%{l_prefix}/sbin \
  75. $RPM_BUILD_ROOT%{l_prefix}/man/man8 \
  76. $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d \
  77. $RPM_BUILD_ROOT%{l_prefix}/etc/postgrey \
  78. $RPM_BUILD_ROOT%{l_prefix}/var/postgrey
  79. # install program and manual page
  80. %{l_shtool} install -c -m 755 \
  81. -e 's;#!/usr/bin/perl;#!%{l_prefix}/bin/perl;g' \
  82. postgrey $RPM_BUILD_ROOT%{l_prefix}/sbin/
  83. %{l_shtool} install -c -m 644 \
  84. postgrey.8 $RPM_BUILD_ROOT%{l_prefix}/man/man8/
  85. # install configuration files
  86. %{l_shtool} install -c -m 644 \
  87. postgrey_client_access \
  88. $RPM_BUILD_ROOT%{l_prefix}/etc/postgrey/
  89. %{l_shtool} install -c -m 644 \
  90. postgrey_recipient_access \
  91. $RPM_BUILD_ROOT%{l_prefix}/etc/postgrey/
  92. # install run-command script
  93. %{l_shtool} mkdir -f -p -m 755 \
  94. $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d
  95. %{l_shtool} install -c -m 755 %{l_value -s -a} \
  96. %{SOURCE rc.postgrey} $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d/
  97. # determine installation files
  98. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
  99. %{l_files_std} \
  100. '%config %{l_prefix}/etc/postgrey/*' \
  101. '%attr(-,%{l_rusr},%{l_rgrp}) %{l_prefix}/var/postgrey'
  102. %files -f files
  103. %clean
  104. rm -rf $RPM_BUILD_ROOT