]>
Commit | Line | Data |
---|---|---|
e01b53ac | 1 | # |
2 | # Conditional build: | |
3 | %bcond_with pgsql # build with support for PostgreSQL | |
4 | # | |
28a0b3aa | 5 | Summary: GLD - a standalone greylisting server for Postfix |
0707ab4a | 6 | Summary(pl.UTF-8): GLD - serwer "szarych list" dla Postfiksa |
b22875fc | 7 | Name: gld |
a9fabe2a | 8 | Version: 1.7 |
e01b53ac | 9 | Release: 2 |
b22875fc | 10 | License: GPL |
11 | Group: Daemons | |
0934d8d1 | 12 | Source0: http://www.gasmi.net/down/%{name}-%{version}.tgz |
a9fabe2a | 13 | # Source0-md5: d24931630504e8586b9eb4cc3cc9d726 |
b22875fc | 14 | Source1: %{name}.init |
15 | Source2: %{name}.sysconfig | |
16 | Patch0: %{name}-conf.patch | |
17 | URL: http://www.gasmi.net/gld.html | |
21692eb4 | 18 | BuildRequires: autoconf |
e01b53ac | 19 | %{!?with_pgsql:BuildRequires: mysql-devel} |
20 | %{?with_pgsql:BuildRequires: postgresql-devel} | |
b22875fc | 21 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
22 | ||
23 | %description | |
28a0b3aa | 24 | Gld is a standalone greylisting server for Postfix. It listens on a TCP |
b22875fc | 25 | port and use MySQL for storing data. The server supports whitelists |
28a0b3aa | 26 | based on sender, sender_domain and client_ip. It supports also light |
fafa606a | 27 | greylisting and DNS white lists. |
b22875fc | 28 | |
723256f4 | 29 | %description -l pl.UTF-8 |
28a0b3aa | 30 | GLD to samodzielny serwer "szarych list" dla Postfiksa. Dane |
723256f4 JR |
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 | |
28a0b3aa | 34 | greylisting" i "DNS white lists". |
b22875fc | 35 | |
36 | %prep | |
37 | %setup -q | |
38 | %patch0 -p1 | |
39 | ||
40 | %build | |
41 | %{__autoconf} | |
e01b53ac | 42 | %configure \ |
43 | %{?with_pgsql:--with-pgsql} \ | |
44 | %{!?with_pgsql:--with-mysql} | |
b22875fc | 45 | |
46 | %{__make} | |
47 | ||
48 | %install | |
49 | rm -rf $RPM_BUILD_ROOT | |
b22875fc | 50 | install -d $RPM_BUILD_ROOT{/etc/{rc.d/init.d,sysconfig},%{_sbindir}} \ |
51 | $RPM_BUILD_ROOT%{_var}/lib/%{name} | |
52 | ||
53 | # init script: | |
54 | install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name} | |
55 | install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/%{name} | |
56 | ||
57 | install gld $RPM_BUILD_ROOT%{_sbindir} | |
28a0b3aa | 58 | install gld.conf $RPM_BUILD_ROOT%{_sysconfdir} |
b22875fc | 59 | |
60 | %clean | |
61 | rm -rf $RPM_BUILD_ROOT | |
62 | ||
63 | %pre | |
64 | %groupadd -g 168 gld | |
65 | %useradd -u 168 -d %{_var}/lib/%{name} -s /sbin/false -c "GreyListing server for Postfix" -g gld gld | |
66 | ||
67 | %post | |
68 | /sbin/chkconfig --add %{name} | |
69 | ||
70 | %preun | |
71 | if [ "$1" = 0 ]; then | |
72 | %service %{name} stop | |
73 | /sbin/chkconfig --del %{name} | |
74 | fi | |
75 | ||
76 | %postun | |
77 | if [ "$1" = 0 ]; then | |
78 | %userremove gld | |
79 | %groupremove gld | |
80 | # should be done?: | |
81 | # rm -rf %{_var}/lib/%{name} | |
82 | fi | |
83 | ||
84 | %files | |
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} |