| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155 |
- ##
- ## ssmtp.spec -- OpenPKG RPM Specification
- ## Copyright (c) 2000-2004 The OpenPKG Project <http://www.openpkg.org/>
- ## Copyright (c) 2000-2004 Ralf S. Engelschall <rse@engelschall.com>
- ## Copyright (c) 2000-2004 Cable & Wireless <http://www.cw.com/>
- ##
- ## Permission to use, copy, modify, and distribute this software for
- ## any purpose with or without fee is hereby granted, provided that
- ## the above copyright notice and this permission notice appear in all
- ## copies.
- ##
- ## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- ## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- ## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- ## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
- ## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- ## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- ## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- ## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- ## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- ## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- ## SUCH DAMAGE.
- ##
- # package version
- %define V_major 2.60
- %define V_minor 12
- # package information
- Name: ssmtp
- Summary: Simple SMTP Send-Only MTA
- URL: ftp://ftp.debian.org/debian/pool/main/s/ssmtp/
- Vendor: Matt Ryan
- Packager: The OpenPKG Project
- Distribution: OpenPKG
- Class: BASE
- Group: Mail
- License: GPL
- Version: %{V_major}.%{V_minor}
- Release: 20041209
- # package options
- %option with_fsl yes
- %option with_ssl no
- # list of sources
- Source0: ftp://ftp.debian.org/debian/pool/main/s/ssmtp/ssmtp_%{version}.tar.gz
- Source1: ssmtp.conf
- Source2: rc.ssmtp
- Source3: fsl.ssmtp
- Patch0: ssmtp.patch
- # build information
- Prefix: %{l_prefix}
- BuildRoot: %{l_buildroot}
- BuildPreReq: OpenPKG, openpkg >= 20040130, make, gcc
- PreReq: OpenPKG, openpkg >= 20040130
- %if "%{with_fsl}" == "yes"
- BuildPreReq: fsl >= 1.2.0
- PreReq: fsl >= 1.2.0
- %endif
- %if "%{with_ssl}" == "yes"
- BuildPreReq: openssl
- PreReq: openssl
- %endif
- AutoReq: no
- AutoReqProv: no
- Provides: MTA
- Conflicts: exim, postfix, sendmail
- %description
- This is sSMTP, a program that replaces sendmail on workstations
- that should send their mail via the departmental mailhub from which
- they pick up their mail (via pop, imap, rsmtp, pop_fetch, NFS... or
- the like). This program accepts mail and sends it to the mailhub,
- optionally replacing the domain in the From: line with a different
- one.
- %track
- prog ssmtp = {
- version = %{version}
- url = ftp://ftp.debian.org/debian/pool/main/s/ssmtp/
- regex = ssmtp_(__VER__)\.tar\.gz
- }
- %prep
- %setup -q -n ssmtp-%{V_major}
- %patch -p0
- %build
- CC="%{l_cc}" \
- CFLAGS="%{l_cflags -O} %{l_cppflags}" \
- LDFLAGS="%{l_fsl_ldflags}" \
- %if "%{with_ssl}" == "yes"
- LIBS="%{l_fsl_ldflags} %{l_fsl_libs} %{l_ldflags} -lssl -lcrypto" \
- %else
- LIBS="%{l_fsl_ldflags} %{l_fsl_libs}" \
- %endif
- ./configure \
- %if "%{with_ssl}" == "yes"
- --enable-ssl \
- %endif
- --prefix=%{l_prefix}
- %{l_make} %{l_mflags}
- %install
- rm -rf $RPM_BUILD_ROOT
- %{l_shtool} mkdir -f -p -m 755 \
- $RPM_BUILD_ROOT%{l_prefix}/var/ssmtp \
- $RPM_BUILD_ROOT%{l_prefix}/sbin \
- $RPM_BUILD_ROOT%{l_prefix}/etc/ssmtp \
- $RPM_BUILD_ROOT%{l_prefix}/man/man8 \
- $RPM_BUILD_ROOT%{l_prefix}/var/ssmtp
- %{l_shtool} install -c -s -m 755 \
- ssmtp $RPM_BUILD_ROOT%{l_prefix}/sbin/
- %{l_shtool} install -c -m 644 \
- -e 's;.B ssmtp;.B %{l_prefix}/sbin/ssmtp;' \
- -e 's;.B /usr/lib/sendmail;.B %{l_prefix}/sbin/sendmail;' \
- ssmtp.8 $RPM_BUILD_ROOT%{l_prefix}/man/man8/
- ln $RPM_BUILD_ROOT%{l_prefix}/sbin/ssmtp \
- $RPM_BUILD_ROOT%{l_prefix}/sbin/sendmail
- ln $RPM_BUILD_ROOT%{l_prefix}/man/man8/ssmtp.8 \
- $RPM_BUILD_ROOT%{l_prefix}/man/man8/sendmail.8
- %{l_shtool} install -c -m 644 %{l_value -s -a} \
- %{SOURCE ssmtp.conf} \
- $RPM_BUILD_ROOT%{l_prefix}/etc/ssmtp/
- %{l_shtool} install -c -m 644 revaliases \
- $RPM_BUILD_ROOT%{l_prefix}/etc/ssmtp/ssmtp.revaliases
- # install run-command script
- %{l_shtool} mkdir -f -p -m 755 \
- $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d
- %{l_shtool} install -c -m 755 %{l_value -s -a} \
- %{SOURCE rc.ssmtp} $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d/
- # install OSSP fsl configuration
- %{l_shtool} mkdir -f -p -m 755 $RPM_BUILD_ROOT%{l_prefix}/etc/fsl
- %{l_shtool} install -c -m 644 %{l_value -s -a} \
- %{SOURCE fsl.ssmtp} \
- $RPM_BUILD_ROOT%{l_prefix}/etc/fsl/
- # determine installation files
- %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
- %{l_files_std} \
- '%not %dir %{l_prefix}/etc/fsl' \
- '%config %{l_prefix}/etc/fsl/fsl.ssmtp' \
- '%config %{l_prefix}/etc/ssmtp/ssmtp.*'
- %files -f files
- %clean
- rm -rf $RPM_BUILD_ROOT
|