Sophie

Sophie

distrib > Mandriva > 10.2 > x86_64 > by-pkgid > 6b566f01963305be78fa75a09bc3ee2a > files > 2

ssmtp-2.60.7-1mdk.src.rpm

%define	name		ssmtp
%define	version		2.60.7
%define	release		1mdk
%define	src_version	2.60

Summary:	A minimal mail-transfer agent which forwards mail to an SMTP server.
Name:		%{name}
Version:	%{version}
Release:	%{release}
License:	GPL
URL:		http://packages.debian.org/unstable/mail/ssmtp.html
Group:		System/Servers
BuildRoot:	%{_tmppath}/%{name}-buildroot
BuildRequires:	rcs
Provides:	smtpdaemon
Requires:	common-licenses

Source:		http://ftp.debian.org/debian/pool/main/s/ssmtp/%{name}_%{version}.tar.bz2
Patch0:		ssmtp-2.50.3-maxsysuid.patch.bz2

%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.

%prep
%setup -q -n %{name}-%{src_version}
# this has to be %patch but it does not work with -g option :(
#%{_bzip2bin} -d < %PATCH0 | patch -p1 -g0 -s
PATCH_GET=0
export PATCH_GET
%patch0 -p1 -b .maxsysuid

# viet 05/08/2003 / by default, the configure script sets sysconfdir
# to /usr/etc, which is no good. The --sysconfdir= switch doesn't do
# anything either because Makefile.in is not using it => patching Makefile.in
perl -pi -e 's|etcdir=\$\(prefix\)/etc|etcdir=\@sysconfdir\@|' Makefile.in

%build
%serverbuild
%configure
%make

%install
rm -fr %{buildroot}

mkdir -p %{buildroot}{%{_sbindir},%{_mandir}/man8,%{_sysconfdir}/ssmtp}

cp ssmtp	%{buildroot}%{_sbindir}/
cp ssmtp.8	%{buildroot}%{_mandir}/man8/
cp ssmtp.conf	%{buildroot}%{_sysconfdir}/ssmtp/
cp revaliases	%{buildroot}%{_sysconfdir}/ssmtp/

#ln -s %{_sbindir}/ssmtp %{buildroot}%{_sbindir}/sendmail
# ln -s %{_mandir}/man8/ssmtp.8.bz2 %{buildroot}%{_mandir}/man8/sendmail.8.bz2
#ln -s ssmtp.8.bz2 %{buildroot}%{_mandir}/man8/sendmail.8.bz2

# Fix perms of %doc files
chmod 644 INSTALL README TLS *.lsm

%clean
rm -fr %{buildroot}

%post
update-alternatives --install %{_sbindir}/sendmail mta %{_sbindir}/ssmtp 5 \
        --slave %{_libdir}/sendmail mta-in_libdir %{_sbindir}/ssmtp 

%preun
if [ $1 = 0 ]; then
	update-alternatives --remove mta %{_sbindir}/ssmtp
fi

%files
%defattr(-,root,root)
%doc INSTALL README TLS *.lsm

%doc %attr(0644, root, root) %{_mandir}/man8/ssmtp.8*
#%doc %{_mandir}/man8/sendmail.8*

%attr(0755, root, root) %config(noreplace) %dir %{_sysconfdir}/ssmtp
%attr(0644, root, root) %config(noreplace) %{_sysconfdir}/ssmtp/*

%attr(0755, root, root) %{_sbindir}/ssmtp

%changelog

* Mon Apr 19 2004 Michael Scherer <misc@mandrake.org> 2.60.7-1mdk 
- 2.60.7, security fix

* Mon Dec 29 2003 Michael Scherer <misc@mandrake.org> 2.60.3-3mdk 
- remove MailTransportAgent
- remove unused sendmail link
- bzip man page with spec-helper

* Tue Aug 05 2003 HA Quôc-Viêt <viet@mandrakesoft.com> 2.60.3-2mdk
- by default, the configure script sets sysconfdir to /usr/etc,
  which is no good. The sysconfdir switch doesn't do anything either
  because Makefile.in is not using it => patching Makefile.in

* Sat Dec 28 2002 Alexander Skwar <ASkwar@DigitalProjects.com> 2.60.3-1mdk
- 2.60.3

* Fri Jun 28 2002 Yves Duret <yduret@mandrakesoft.com> 2.50.3-3mdk
- use update-alternatives.
- use %%serverbuild.

* Tue Feb 25 2002 Andrej Borsenkow <arvidjaar@mail.ru> 2.50.3-2mdk
- change max system UID to 499
- conflicts with sendmail,postfix (anybody wanna alternatives for
  /usr/sbin/sendmail here?)
- provides MailTransportAgent

* Tue Feb 19 2002 Alexander Skwar <ASkwar@DigitalProjects.com> 2.50.3-1mdk
- First Mandrake release
- Using Debian source of 2.50.3

* Thu May 25 2000 Steven Brooks <urracht@home.com>
- Created this spec file.