ssmtp.spec 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  1. ##
  2. ## ssmtp.spec -- OpenPKG RPM Specification
  3. ## Copyright (c) 2000-2002 Cable & Wireless Deutschland GmbH
  4. ## Copyright (c) 2000-2002 The OpenPKG Project <http://www.openpkg.org/>
  5. ## Copyright (c) 2000-2002 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: ssmtp
  27. Summary: Simple SMTP MTA
  28. URL: ftp://metalab.unc.edu/pub/Linux/system/mail/mta/
  29. Vendor: Matt Ryan
  30. Packager: The OpenPKG Project
  31. Distribution: OpenPKG [BASE]
  32. Group: Mail
  33. License: GPL
  34. Version: 2.48
  35. Release: 20020821
  36. # list of sources
  37. Source0: ftp://metalab.unc.edu/pub/Linux/system/mail/mta/ssmtp-%{version}.tar.gz
  38. Source1: ssmtp.conf
  39. Patch0: ssmtp.patch
  40. # build information
  41. Prefix: %{l_prefix}
  42. BuildRoot: %{l_buildroot}
  43. BuildPreReq: OpenPKG, openpkg >= 20020206, make, gcc
  44. PreReq: OpenPKG, openpkg >= 20020206
  45. AutoReq: no
  46. AutoReqProv: no
  47. Provides: MTA
  48. Conflicts: sendmail, exim, postfix
  49. %description
  50. This is sSMTP, a program that replaces sendmail on workstations
  51. that should send their mail via the departmental mailhub from which
  52. they pick up their mail (via pop, imap, rsmtp, pop_fetch, NFS... or
  53. the like). This program accepts mail and sends it to the mailhub,
  54. optionally replacing the domain in the From: line with a different
  55. one.
  56. %prep
  57. %setup0 -q
  58. rm -rf RCS
  59. %patch0 -p0
  60. rm config.cache
  61. %build
  62. CC="%{l_cc}" \
  63. CFLAGS="%{l_cflags -O}" \
  64. ./configure \
  65. --prefix=%{l_prefix}
  66. %{l_make} %{l_mflags} \
  67. SSMTPCONFDIR="%{l_prefix}/etc/ssmtp" \
  68. CONFIGURATION_FILE="%{l_prefix}/etc/ssmtp/ssmtp.conf" \
  69. REVALIASES_FILE="%{l_prefix}/etc/ssmtp/ssmtp.revaliases"
  70. %install
  71. rm -rf $RPM_BUILD_ROOT
  72. %{l_shtool} mkdir -f -p -m 755 \
  73. $RPM_BUILD_ROOT%{l_prefix}/sbin \
  74. $RPM_BUILD_ROOT%{l_prefix}/etc/ssmtp \
  75. $RPM_BUILD_ROOT%{l_prefix}/man/man8 \
  76. $RPM_BUILD_ROOT%{l_prefix}/var/ssmtp
  77. %{l_shtool} install -c -s -m 755 \
  78. ssmtp $RPM_BUILD_ROOT%{l_prefix}/sbin/
  79. chmod u+w ssmtp.8
  80. %{l_shtool} install -c -m 644 \
  81. -e 's;.B ssmtp;.B %{l_prefix}/sbin/ssmtp;' \
  82. -e 's;.B /usr/lib/sendmail;.B %{l_prefix}/sbin/sendmail;' \
  83. ssmtp.8 $RPM_BUILD_ROOT%{l_prefix}/man/man8/
  84. ln $RPM_BUILD_ROOT%{l_prefix}/sbin/ssmtp \
  85. $RPM_BUILD_ROOT%{l_prefix}/sbin/sendmail
  86. ln $RPM_BUILD_ROOT%{l_prefix}/man/man8/ssmtp.8 \
  87. $RPM_BUILD_ROOT%{l_prefix}/man/man8/sendmail.8
  88. %{l_shtool} install -c -m 644 -e 's;@l_prefix@;%{l_prefix};g' \
  89. %{SOURCE ssmtp.conf} \
  90. $RPM_BUILD_ROOT%{l_prefix}/etc/ssmtp/
  91. %{l_shtool} install -c -m 644 revaliases \
  92. $RPM_BUILD_ROOT%{l_prefix}/etc/ssmtp/ssmtp.revaliases
  93. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
  94. %{l_files_std} \
  95. '%config %{l_prefix}/etc/ssmtp/ssmtp.conf'
  96. %files -f files
  97. %clean
  98. rm -rf $RPM_BUILD_ROOT