91 lines
2.5 KiB
RPMSpec
91 lines
2.5 KiB
RPMSpec
|
%define groupid 65060
|
||
|
%define userid 65060
|
||
|
Name: postgrey
|
||
|
Version: 1.37
|
||
|
Release: 1mamba
|
||
|
Summary: A Postfix policy server for greylisting
|
||
|
Group: System/Servers
|
||
|
Vendor: openmamba
|
||
|
Distribution: openmamba
|
||
|
Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
|
||
|
URL: https://www.howtoforge.com/greylisting_postfix_postgrey
|
||
|
Source: https://postgrey.schweikert.ch/pub/postgrey-%{version}.tar.gz
|
||
|
Source1: postgrey.service
|
||
|
Source2: postgrey.tmpfiles
|
||
|
License: GPL
|
||
|
## AUTOBUILDREQ-BEGIN
|
||
|
BuildRequires: libperl
|
||
|
BuildRequires: perl-BerkeleyDB
|
||
|
BuildRequires: perl-Net-DNS
|
||
|
BuildRequires: perl-Net-Server
|
||
|
BuildRequires: perl-NetAddr-IP
|
||
|
BuildRequires: perl-devel
|
||
|
## AUTOBUILDREQ-END
|
||
|
Requires: perl
|
||
|
Requires: perl-Net-Server
|
||
|
Requires: perl-IO-Multiplex
|
||
|
Requires: perl-Net-DNS
|
||
|
Requires: perl-NetAddr-IP
|
||
|
Requires: perl-BerkeleyDB
|
||
|
BuildRoot: %{_tmppath}/%{name}-%{version}-root
|
||
|
|
||
|
%description
|
||
|
A Postfix policy server for greylisting.
|
||
|
|
||
|
%prep
|
||
|
%setup -q
|
||
|
|
||
|
%build
|
||
|
|
||
|
%install
|
||
|
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
|
||
|
install -D -m0755 postgrey %{buildroot}%{_bindir}/postgrey
|
||
|
install -D -m0644 %{SOURCE1} %{buildroot}%{_unitdir}/postgrey.service
|
||
|
install -D -m0644 %{SOURCE2} %{buildroot}%{_tmpfilesdir}/postgrey.conf
|
||
|
install -D -m0755 contrib/postgreyreport %{buildroot}%{_bindir}/postgreyreport
|
||
|
install -D -m0644 postgrey_whitelist_recipients %{buildroot}%{_sysconfdir}/postfix/postgrey_whitelist_recipients
|
||
|
install -D -m0644 postgrey_whitelist_clients %{buildroot}%{_sysconfdir}/postfix/postgrey_whitelist_clients
|
||
|
|
||
|
%clean
|
||
|
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
|
||
|
|
||
|
%pre
|
||
|
/usr/sbin/groupadd postgrey -g %{groupid} 2>/dev/null
|
||
|
/usr/sbin/useradd -u %{userid} -c 'Postgrey user' -d /dev/null -g postgrey \
|
||
|
-s /bin/true postgrey 2>/dev/null
|
||
|
:
|
||
|
|
||
|
%preun
|
||
|
%systemd_preun postgrey
|
||
|
# erase
|
||
|
if [ $1 -eq 0 ]; then
|
||
|
/usr/sbin/userdel postgrey 2>/dev/null
|
||
|
/usr/sbin/groupdel postgrey 2>/dev/null
|
||
|
fi
|
||
|
:
|
||
|
|
||
|
%post
|
||
|
/sbin/ldconfig
|
||
|
%tmpfiles_create postgrey.conf
|
||
|
%systemd_post postgrey
|
||
|
:
|
||
|
|
||
|
%postun
|
||
|
/sbin/ldconfig
|
||
|
%systemd_postun_with_restart postgrey
|
||
|
:
|
||
|
|
||
|
%files
|
||
|
%defattr(-,root,root)
|
||
|
%config(noreplace) %{_sysconfdir}/postfix/postgrey_whitelist_clients
|
||
|
%config(noreplace) %{_sysconfdir}/postfix/postgrey_whitelist_recipients
|
||
|
%{_bindir}/postgrey
|
||
|
%{_bindir}/postgreyreport
|
||
|
%{_tmpfilesdir}/postgrey.conf
|
||
|
%{_unitdir}/postgrey.service
|
||
|
%doc COPYING
|
||
|
|
||
|
%changelog
|
||
|
* Wed Aug 14 2019 Silvan Calarco <silvan.calarco@mambasoft.it> 1.37-1mamba
|
||
|
- package created using the webbuild interface
|