Sophie

Sophie

distrib > Fedora > 13 > i386 > by-pkgid > 19fecb2d34423a081178626185b02cb2 > files > 2

greylistd-0.8.7-12.fc12.src.rpm

# This is like _initrddir but properly spelled
%define _initdir %{_sysconfdir}/rc.d/init.d

Summary: Greylisting daemon
Name: greylistd
Version: 0.8.7
Release: 12%{?dist}
License: GPLv2+
Group: System Environment/Daemons
Source0: ftp://ftp.debian.org/debian/pool/main/g/greylistd/%{name}_%{version}.tar.gz
Source1: greylistd.init
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
BuildArch: noarch
Requires(post): /sbin/chkconfig
Requires(preun): /sbin/chkconfig
Requires(preun): /sbin/service

%description
Greylisting is a simple but highly effective means to weed out
messages that are being delivered via spamware/ratware tools.  The
idea is to establish whether a prior relationship exists between the
sender and the receiver of a message.  Most of the time it does, and
the delivery proceeds normally.

On the other hand, if no prior relationship exists, the delivery is
temporarily rejected.  Legitimate MTAs will treat this response
accordingly, and retry the delivery in a while.  In contrast, ratware
will usually fail to retry the delivery in a normal fashion.

%prep
%setup -q

%build

%install
rm -rf %{buildroot}

mkdir -p %{buildroot}%{_bindir}
install -p -m 0755 ./program/greylist %{buildroot}%{_bindir}/
mkdir -p %{buildroot}%{_sbindir}
install -p -m 0755 ./program/greylistd* %{buildroot}%{_sbindir}/
mkdir -p %{buildroot}%{_mandir}/{man1,man8}
install -p -m 0644 ./doc/man1/* %{buildroot}%{_mandir}/man1/
install -p -m 0644 ./doc/man8/* %{buildroot}%{_mandir}/man8/
mkdir -p %{buildroot}%{_initdir}
install -p -m 0755 %{SOURCE1} %{buildroot}%{_initdir}/greylistd
mkdir -p %{buildroot}/var/lib/greylistd
touch %{buildroot}/var/lib/greylistd/{states,triplets}
mkdir -p %{buildroot}/var/run/greylistd
touch %{buildroot}/var/run/greylistd/socket
mkdir -p %{buildroot}%{_sysconfdir}/greylistd
install -p -m 0644 ./config/config %{buildroot}%{_sysconfdir}/greylistd/

%pre
/usr/sbin/useradd -c "Greylisting deamon" \
        -s /sbin/nologin -r -d /var/lib/greylistd greylistd 2> /dev/null || :


%post
/sbin/chkconfig --add greylistd

%preun
if [ $1 = 0 ]; then
        /sbin/service greylistd stop > /dev/null 2>&1
        /sbin/chkconfig --del greylistd
fi

%clean
rm -rf %{buildroot}


%files
%defattr(-,root,root,-)
%doc ./doc/examples ./config/whitelist-hosts
%{_bindir}/greylist
%{_sbindir}/greylistd*
%{_mandir}/*/*
%{_initdir}/greylistd
%dir %{_sysconfdir}/greylistd
%config(noreplace) %{_sysconfdir}/greylistd/config
%dir %attr(0750,greylistd,greylistd) /var/lib/greylistd
%attr(0640,greylistd,greylistd) %ghost %verify(not mtime size md5) /var/lib/greylistd/states
%attr(0640,greylistd,greylistd) %ghost %verify(not mtime size md5) /var/lib/greylistd/triplets
%dir %attr(0755,greylistd,greylistd) /var/run/greylistd
%attr(0644,greylistd,greylistd) %ghost %verify(not mtime size md5) /var/run/greylistd/socket

%changelog
* Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.8.7-12
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild

* Tue Feb 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.8.7-11
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild

* Thu Aug 14 2008 Axel Thimm <Axel.Thimm@ATrpms.net> - 0.8.7-10
- Update to 0.8.7.

* Wed May 21 2008 Tom "spot" Callaway <tcallawa@redhat.com> - 0.8.3.2-9
- fix license tag

* Wed Jan 10 2007 Axel Thimm <Axel.Thimm@ATrpms.net> - 0.8.3.2-8
- Remove double initfile in %%files.

* Sun Dec 31 2006 Axel Thimm <Axel.Thimm@ATrpms.net> - 0.8.3.2-7
- Add definition of _initdir.

* Wed Dec 27 2006 Axel Thimm <Axel.Thimm@ATrpms.net> - 0.8.3.2-6
- Update to 0.8.3.2.

* Thu Feb 17 2005 Axel Thimm <Axel.Thimm@ATrpms.net>
- Initial build.