ssmtp.spec 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. ##
  2. ## ssmtp.spec -- OpenPKG RPM Specification
  3. ## Copyright (c) 2000-2001 Cable & Wireless Deutschland GmbH
  4. ## Copyright (c) 2000-2001 Ralf S. Engelschall <rse@engelschall.com>
  5. ##
  6. ## Permission to use, copy, modify, and distribute this software for
  7. ## any purpose with or without fee is hereby granted, provided that
  8. ## the above copyright notice and this permission notice appear in all
  9. ## copies.
  10. ##
  11. ## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  12. ## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
  13. ## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
  14. ## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
  15. ## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  16. ## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  17. ## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
  18. ## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
  19. ## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  20. ## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
  21. ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  22. ## SUCH DAMAGE.
  23. ##
  24. # package information
  25. Name: ssmtp
  26. Summary: Simple SMTP MTA
  27. URL: ftp://metalab.unc.edu/pub/Linux/system/mail/mta/
  28. Vendor: Matt Ryan
  29. Packager: The OpenPKG Project
  30. Distribution: OpenPKG [EXP]
  31. Group: Mail
  32. License: GPL
  33. Version: 2.39.1
  34. Release: 3
  35. # list of sources
  36. Source0: ftp://metalab.unc.edu/pub/Linux/system/mail/mta/ssmtp-%{version}.tar.gz
  37. Source1: ssmtp.conf
  38. # build information
  39. Prefix: %{l_prefix}
  40. BuildRoot: %{l_buildroot}
  41. BuildPreReq: OpenPKG, openpkg >= 0.9-33, make
  42. PreReq: OpenPKG, openpkg >= 0.9-33
  43. AutoReq: no
  44. AutoReqProv: no
  45. Provides: MTA
  46. %description
  47. This is sSMTP, a program that replaces sendmail on workstations
  48. that should send their mail via the departmental mailhub from which
  49. they pick up their mail (via pop, imap, rsmtp, pop_fetch, NFS... or
  50. the like). This program accepts mail and sends it to the mailhub,
  51. optionally replacing the domain in the From: line with a different
  52. one.
  53. %prep
  54. %setup -q -n ssmtp-2.39
  55. %build
  56. CC="%{l_cc}" \
  57. CFLAGS="%{l_cflags -O}" \
  58. ./configure \
  59. --prefix=%{l_prefix}
  60. %{l_make} %{l_mflags} \
  61. SSMTPCONFDIR="%{l_prefix}/etc/ssmtp" \
  62. CONFIGURATION_FILE="%{l_prefix}/etc/ssmtp/ssmtp.conf" \
  63. REVALIASES_FILE="%{l_prefix}/etc/ssmtp/ssmtp.revaliases"
  64. %install
  65. rm -rf $RPM_BUILD_ROOT
  66. %{l_shtool} mkdir -f -p -m 755 \
  67. $RPM_BUILD_ROOT%{l_prefix}/sbin \
  68. $RPM_BUILD_ROOT%{l_prefix}/etc/ssmtp \
  69. $RPM_BUILD_ROOT%{l_prefix}/man/man8 \
  70. $RPM_BUILD_ROOT%{l_prefix}/var/ssmtp
  71. %{l_shtool} install -c -s -m 755 \
  72. ssmtp $RPM_BUILD_ROOT%{l_prefix}/sbin/
  73. chmod u+w ssmtp.8
  74. %{l_shtool} install -c -m 644 \
  75. -e 's;.B ssmtp;.B %{l_prefix}/sbin/ssmtp;' \
  76. -e 's;.B /usr/lib/sendmail;.B %{l_prefix}/sbin/sendmail;' \
  77. ssmtp.8 $RPM_BUILD_ROOT%{l_prefix}/man/man8/
  78. ln $RPM_BUILD_ROOT%{l_prefix}/sbin/ssmtp \
  79. $RPM_BUILD_ROOT%{l_prefix}/sbin/sendmail
  80. ln $RPM_BUILD_ROOT%{l_prefix}/man/man8/ssmtp.8 \
  81. $RPM_BUILD_ROOT%{l_prefix}/man/man8/sendmail.8
  82. %{l_shtool} install -c -m 644 -e "s;@l_prefix@;%{l_prefix};g" \
  83. %{SOURCE ssmtp.conf} \
  84. $RPM_BUILD_ROOT%{l_prefix}/etc/ssmtp/
  85. %{l_shtool} install -c -m 644 revaliases \
  86. $RPM_BUILD_ROOT%{l_prefix}/etc/ssmtp/ssmtp.revaliases
  87. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
  88. %{l_files_std} \
  89. '%config %{l_prefix}/etc/ssmtp/ssmtp.conf'
  90. %files -f files
  91. %clean
  92. rm -rf $RPM_BUILD_ROOT