File enma.spec of Package enma

Summary: A milter program for domain authentication technologies
Name: enma
Version: 1.2.0
Release: 3
License: BSD
URL: http://enma.sourceforge.net/
Group: Applications/Internet
Source0: enma-1.2.0.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: bind-libs ldns-devel sendmail-devel openssl-devel >= 0.9.8
Requires: bind-libs libldns1 openssl >= 0.9.8

%description
ENMA is a program of domain authentication technologies. It authenticates
message senders with SPF, Sender ID, DKIM and/or DKIM ADSP and inserts
the Authentication-Results: field with authentication results.

%prep
%setup -q

%build
%configure --with-libbind-incdir=/usr/include/bind
make %{?_smp_mflags}

%install
rm -rf %{buildroot}
make install DESTDIR=%{buildroot}

mkdir -p %{buildroot}%{_initrddir}
install -m 755 enma/etc/rc.enma-centos %{buildroot}%{_initrddir}/enma
install -m 644 enma/etc/enma.conf.sample %{buildroot}%{_sysconfdir}/enma.conf

mkdir -p %{buildroot}%{_localstatedir}/run/enma/

%clean
rm -rf %{buildroot}

%post
libtool --finish /usr/lib64
systemctl enable enma.service >/dev/null 2>&1

%preun
if [ $1 = 0 ] ; then
    systemctl stop enma.service >/dev/null 2>&1
fi

%postun
if [ $1 -ge 1 ] ; then
    systemctl restart enma.service >/dev/null 2>&1
fi

%files
%defattr(-, root, root, -)
%doc ChangeLog LICENSE LICENSE.ja README README.ja INSTALL INSTALL.ja
%{_bindir}/*
%{_libexecdir}/*
%{_libdir}/*
%{_mandir}/*/*
# %{_mandir}/ja*/*/*
%{_initrddir}/enma
%config %{_sysconfdir}/enma.conf
%attr(0750, daemon, daemon) %dir %{_localstatedir}/run/enma/

%changelog
* Wed Feb 22 2017 Koga <koga@iij.ad.jp>
- (1.2.0-3)
- add systemd support

* Tue Aug 11 2015 Koga <koga@iij.ad.jp>
- (1.2.0-2)
- fix dependencies.

* Sat Aug 10 2013 Koga <koga@iij.ad.jp>
- (1.2.0-1)
- catch up 1.2.0.

* Tue Jul 14 2009 Koga <koga@iij.ad.jp>
- (1.1.0-2)
- add openSUSE Build Service repository

* Fri Apr 03 2009 SUZUKI Takahiko <takahiko@iij.ad.jp>
- (1.1.0-1)
- support DKIM (verification only) and DKIM ADSP
- support exclusion address list to avoid authentication

* Thu Aug 28 2008 SUZUKI Takahiko <takahiko@iij.ad.jp>
- (1.0.0-1)
- public release

* Tue Aug 26 2008 SUZUKI Takahiko <takahiko@iij.ad.jp>
- (0.9.2-1)
- new upstream release

* Fri Aug 22 2008 SUZUKI Takahiko <takahiko@iij.ad.jp>
- (0.9.1-1)
- new upstream release

* Tue Aug 19 2008 Mitsuru Shimamura <simamura@iij.ad.jp>
- (0.9.0-1)
- internal beta release
openSUSE Build Service is sponsored by