Sophie

Sophie

distrib > Mageia > 2 > i586 > media > core-release-src > by-pkgid > 2812da7b9152345ba5bbb45bfcc221e0 > files > 6

dma-0.7-1.mga2.src.rpm

%define	name		dma
%define	version		0.7
%define	release		1

Summary:	dma is an end-system mail server and supports queueing and local & remote mail delivery via SMTP and SSL/TLS
Name:		%{name}
Version:	%{version}
Release:	%mkrel %{release}
License:	BSD
URL:		https://github.com/corecode/dma
Group:		Networking/Mail

BuildRequires:	flex
BuildRequires:	bison
BuildRequires:	openssl-devel

Provides:	sendmail-command

# The source was obtained from upstream git repository:
# git clone git://github.com/corecode/dma.git
# pushd dma
# git archive --prefix=dma-X.Y/ -o ../dma-X.Y.tar commit_id
# popd
# xz -z -e dma-X.Y.tar
Source0:	dma-%{version}.tar.xz
Source1:	dma-aliases
Source2:	README.install.urpmi
Patch0:		dma-0.2-mga-fix-build-in-rpm-env.patch
Patch1:		dma-0.2-mga-locate-aliases-in-dma-etc-subdir.patch

%description
DragonFly Mail Agent (dma) is a small and secure MTA (mail transport agent) for
end-system use.
It features:
– daemon-less operation
– queueing
– aliases
– local delivery
– remote delivery via SMTP
– SSL support via STARTTLS and SSL
– SMTP AUTH LOGIN and -MD5 (for smart hosts)

%files
%doc TODO README.markdown VERSION README.install.urpmi
%attr(2755, root, mail)%{_sbindir}/%{name}
%attr(4750, root, mail)%{_libdir}/dma-mbox-create
%{_mandir}/man8/%{name}.8.*
%attr(770, root, mail)%{_var}/spool/%{name}
%config(noreplace) %{_sysconfdir}/%{name}/%{name}.conf
%config(noreplace) %{_sysconfdir}/%{name}/auth.conf
%config(noreplace) %{_sysconfdir}/%{name}/aliases

#----------------------------------------------------------------------------

%prep
%setup -q
%patch0
%patch1

%build
%make -j1 CFLAGS="%optflags \
		-DDMA_VERSION='\"%{version}\"' \
		-DLIBEXEC_PATH='\"%{_libdir}\"' \
		-DCONF_PATH='\"/etc/dma\"'" \
		LIBEXEC=%{_libdir} \
		PREFIX=%{_prefix}

%install
%__rm -rf %{buildroot}
%makeinstall DESTDIR=%{buildroot} LIBEXEC=%{_libdir} PREFIX=%{_prefix}

%__install -d %{buildroot}/%{_sysconfdir}/%{name}
%__cp auth.conf %{buildroot}/%{_sysconfdir}/%{name}/auth.conf
%__cp dma.conf %{buildroot}/%{_sysconfdir}/%{name}/%{name}.conf
%__cp %{SOURCE1} %{buildroot}/%{_sysconfdir}/%{name}/aliases
%__install -m644 %{SOURCE2} README.install.urpmi

%post
/usr/sbin/update-alternatives --install %{_sbindir}/sendmail sendmail-command %{_sbindir}/%{name} 5 \
					--slave %{_prefix}/lib/sendmail sendmail-command-in_libdir %{_sbindir}/%{name} \
					--slave %{_bindir}/mailq mta-mailq %{_sbindir}/%{name}

%postun
if [ ! -e %{_sbindir}/%{name} ]; then
		/usr/sbin/update-alternatives --remove sendmail-command %{_sbindir}/%{name}
fi


%changelog

* Tue Jan 10 2012 julien <julien> 0.7-1.mga2
+ Revision: 194563
- new version 0.7
- display message about aliases only at install time (really this time)

* Thu Dec 08 2011 julien <julien> 0.6-1.mga2
+ Revision: 179315
- update to v0.6
- change README.urpmi to README.install.urpmi to only display at install

* Wed Nov 23 2011 julien <julien> 0.5-1.mga2
+ Revision: 171475
- force -j1 to avoid build failure
- correct URL for website (github instead of gitorious)
- tarball is now xz xompressed
- update to dma 0.5
- rediff patch0
- add an alternative to mailq
- clean spec a bit

* Wed Sep 21 2011 julien <julien> 0.3-1.mga2
+ Revision: 146540
- upgrade to version 0.3

* Sat Jan 15 2011 mikala <mikala> 0.2-2.mga1
+ Revision: 18586
- Rename patch
- imported package dma