ssmtp.spec 3.8 KB

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