3 %bcond_with pgsql # build with support for PostgreSQL
5 Summary: GLD - a standalone greylisting server for Postfix
6 Summary(pl.UTF-8): GLD - serwer "szarych list" dla Postfiksa
12 Source0: http://www.gasmi.net/down/%{name}-%{version}.tgz
13 # Source0-md5: d24931630504e8586b9eb4cc3cc9d726
15 Source2: %{name}.sysconfig
16 Patch0: %{name}-conf.patch
17 URL: http://www.gasmi.net/gld.html
18 BuildRequires: autoconf
19 %{!?with_pgsql:BuildRequires: mysql-devel}
20 %{?with_pgsql:BuildRequires: postgresql-devel}
21 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
24 Gld is a standalone greylisting server for Postfix. It listens on a TCP
25 port and use MySQL for storing data. The server supports whitelists
26 based on sender, sender_domain and client_ip. It supports also light
27 greylisting and DNS white lists.
29 %description -l pl.UTF-8
30 GLD to samodzielny serwer "szarych list" dla Postfiksa. Dane
31 przechowuje w bazie MySQL, do komunikacji używa TCP/IP. Serwer
32 umożliwia listowanie W oparciu o nadawcę, domenę nadawcy i adres IP
33 klienta (sender, sender_domain, client_ip). Obsługuje również "light
34 greylisting" i "DNS white lists".
43 %{?with_pgsql:--with-pgsql} \
44 %{!?with_pgsql:--with-mysql}
49 rm -rf $RPM_BUILD_ROOT
50 install -d $RPM_BUILD_ROOT{/etc/{rc.d/init.d,sysconfig},%{_sbindir}} \
51 $RPM_BUILD_ROOT%{_var}/lib/%{name}
54 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
55 install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/%{name}
57 install gld $RPM_BUILD_ROOT%{_sbindir}
58 install gld.conf $RPM_BUILD_ROOT%{_sysconfdir}
61 rm -rf $RPM_BUILD_ROOT
65 %useradd -u 168 -d %{_var}/lib/%{name} -s /sbin/false -c "GreyListing server for Postfix" -g gld gld
68 /sbin/chkconfig --add %{name}
73 /sbin/chkconfig --del %{name}
81 # rm -rf %{_var}/lib/%{name}
85 %defattr(644,root,root,755)
86 %doc HISTORY README README-pgsql README-SECURITY tables.mysql tables.pgsql table-whitelist.sql
87 %attr(640,root,gld) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}.conf
88 %attr(640,root,gld) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/%{name}
89 %attr(754,root,root) /etc/rc.d/init.d/%{name}
90 %attr(755,root,root) %{_sbindir}/%{name}
91 %dir %attr(711,gld,gld) %{_var}/lib/%{name}