smtpfeed.spec 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135
  1. ##
  2. ## smtpfeed.spec -- OpenPKG RPM Specification
  3. ## Copyright (c) 2000-2003 Cable & Wireless Deutschland GmbH
  4. ## Copyright (c) 2000-2003 The OpenPKG Project <http://www.openpkg.org/>
  5. ## Copyright (c) 2000-2003 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: smtpfeed
  27. Summary: LMTP Mailer for Mass Delivery via SMTP
  28. URL: http://www.kyoto.wide.ad.jp/smtpfeed/
  29. Vendor: Motonori Nakamura
  30. Packager: The OpenPKG Project
  31. Distribution: OpenPKG [BASE]
  32. Group: Mail
  33. License: GPL
  34. Version: 1.18
  35. Release: 20030708
  36. # package options
  37. %option with_fsl yes
  38. # list of sources
  39. Source0: ftp://ftp.kyoto.wide.ad.jp/pub/mail/smtpfeed/smtpfeed-%{version}.tar.gz
  40. Source1: smtpfeedd.tar.gz
  41. Source2: rc.smtpfeed
  42. Source3: fsl.smtpfeed
  43. # build information
  44. Prefix: %{l_prefix}
  45. BuildRoot: %{l_buildroot}
  46. BuildPreReq: OpenPKG, openpkg >= 20030516
  47. PreReq: OpenPKG, openpkg >= 20030516
  48. %if "%{with_fsl}" == "yes"
  49. BuildPreReq: fsl
  50. PreReq: fsl
  51. %endif
  52. AutoReq: no
  53. AutoReqProv: no
  54. %description
  55. SMTPfeed is an SMTP delivery agent which is called by an
  56. LMTP-speaking MTA (like Sendmail). It improves time required to
  57. complete delivery a message to huge number of recipients. SMTPfeed
  58. is effective for delivery of large mailing lists.
  59. %prep
  60. %setup0 -q -c
  61. %setup1 -q -T -D -a 1
  62. %build
  63. # build SMTPfeed
  64. ( cd smtpfeed-%{version}
  65. %{l_shtool} subst \
  66. -e 's;smtpfeed 1.[0-9]*;smtpfeed %{version};' \
  67. version.c
  68. CC="%{l_cc}" \
  69. CFLAGS="%{l_cflags}" \
  70. LDFLAGS="%{l_ldflags} %{l_fsl_ldflags}" \
  71. LIBS="%{l_fsl_libs}" \
  72. ./configure \
  73. --prefix=%{l_prefix}
  74. %{l_make} %{l_mflags -O}
  75. )
  76. # build smtpfeed daemon
  77. ( cd smtpfeedd
  78. CC="%{l_cc}" \
  79. LDFLAGS="%{l_fsl_ldflags}" \
  80. LIBS="%{l_fsl_libs}" \
  81. ./configure
  82. %{l_make} %{l_mflags}
  83. )
  84. %install
  85. rm -rf $RPM_BUILD_ROOT
  86. %{l_shtool} mkdir -f -p -m 755 \
  87. $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d \
  88. $RPM_BUILD_ROOT%{l_prefix}/sbin \
  89. $RPM_BUILD_ROOT%{l_prefix}/man/man8 \
  90. $RPM_BUILD_ROOT%{l_prefix}/var/smtpfeed
  91. ( cd smtpfeed-%{version}
  92. %{l_shtool} install -c -s -m 755 \
  93. smtpfeed $RPM_BUILD_ROOT%{l_prefix}/sbin/
  94. %{l_shtool} install -c -m 644 \
  95. smtpfeed.8 $RPM_BUILD_ROOT%{l_prefix}/man/man8/
  96. %{l_shtool} install -c -m 644 \
  97. /dev/null $RPM_BUILD_ROOT%{l_prefix}/var/smtpfeed/smtpfeed.log
  98. )
  99. %{l_shtool} install -c -s -m 755 \
  100. smtpfeedd/smtpfeedd $RPM_BUILD_ROOT%{l_prefix}/sbin/
  101. %{l_shtool} install -c -m 755 \
  102. -e 's;@l_prefix@;%{l_prefix};g' \
  103. -e 's;@l_susr@;%{l_susr};g' \
  104. -e 's;@l_rusr@;%{l_rusr};g' \
  105. -e 's;@l_rgrp@;%{l_rgrp};g' \
  106. %{SOURCE rc.smtpfeed} $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d/
  107. # install OSSP fsl configuration
  108. %{l_shtool} mkdir -f -p -m 755 $RPM_BUILD_ROOT%{l_prefix}/etc/fsl
  109. %{l_shtool} install -c -m 644 \
  110. -e 's;@l_prefix@;%{l_prefix};g' \
  111. %{SOURCE fsl.smtpfeed} \
  112. $RPM_BUILD_ROOT%{l_prefix}/etc/fsl/
  113. # determine installation files
  114. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
  115. %{l_files_std} \
  116. '%not %dir %{l_prefix}/etc/fsl' \
  117. '%config %{l_prefix}/etc/fsl/fsl.smtpfeed'
  118. %files -f files
  119. %clean
  120. rm -rf $RPM_BUILD_ROOT