]> git.pld-linux.org Git - SPECS.git/blob - gld.spec
SPECS updated Tue 30 Apr 15:13:02 CEST 2024
[SPECS.git] / gld.spec
1 #
2 # Conditional build:
3 %bcond_with     pgsql   # build with support for PostgreSQL
4 #
5 Summary:        GLD - a standalone greylisting server for Postfix
6 Summary(pl.UTF-8):      GLD - serwer "szarych list" dla Postfiksa
7 Name:           gld
8 Version:        1.7
9 Release:        5
10 License:        GPL
11 Group:          Daemons
12 Source0:        http://www.gasmi.net/down/%{name}-%{version}.tgz
13 # Source0-md5:  d24931630504e8586b9eb4cc3cc9d726
14 Source1:        %{name}.init
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)
22
23 %description
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.
28
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".
35
36 %prep
37 %setup -q
38 %patch0 -p1
39
40 %build
41 %{__autoconf}
42 %configure \
43         %{?with_pgsql:--with-pgsql} \
44         %{!?with_pgsql:--with-mysql}
45
46 %{__make}
47
48 %install
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}
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}
58 install gld.conf $RPM_BUILD_ROOT%{_sysconfdir}
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}
This page took 0.745955 seconds and 3 git commands to generate.