-
Notifications
You must be signed in to change notification settings - Fork 0
/
spamdyke.spec
115 lines (99 loc) · 4.22 KB
/
spamdyke.spec
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
Name: spamdyke
Summary: connection-time spam filter for qmail
Version: 4.3.1
Release: 1%{?dist}
License: GPL (version 2 only)
Group: System Environment/Libraries
Vendor: QmailToaster
Packager: Eric Shubert <[email protected]>
URL: http://www.spamdyke.org/
Source0: http://www.spamdyke.org/releases/%{name}-%{version}.tgz
Source1: spamdyke.conf
Source2: blacklist_keywords
Source3: whitelist_ip
Source4: sd-prune-graylist
BuildRequires: openssl-devel
BuildRoot: %{_topdir}/BUILDROOT/%{name}-%{version}-%{release}.%{_arch}
%define debug_package %{nil}
%define BASE_DIR /opt/%{name}
%define BIN_DIR %{BASE_DIR}/bin
%define CONF_DIR %{BASE_DIR}/etc
%define VAR_DIR %{BASE_DIR}/var
%define BIN_LINK %{_bindir}
%define CONF_LINK %{_sysconfdir}/%{name}
%define VAR_LINK %{_localstatedir}/%{name}
#-------------------------------------------------------------------------------
%description
#-------------------------------------------------------------------------------
spamdyke is a filter for monitoring and intercepting SMTP connections
between a remote host and a qmail server.
Spam is blocked while the remote server (spammer) is still connected;
no additional processing or storage is needed.
spamdyke also includes a number of features to enhance qmail.
#-------------------------------------------------------------------------------
%prep
#-------------------------------------------------------------------------------
%setup -q
#-------------------------------------------------------------------------------
%build
#-------------------------------------------------------------------------------
cd %{name}
./configure
make
#-------------------------------------------------------------------------------
%install
#-------------------------------------------------------------------------------
%{__rm} -rf %{buildroot}
%{__mkdir_p} %{buildroot}%{BASE_DIR} \
%{buildroot}%{BIN_DIR} \
%{buildroot}%{CONF_DIR} \
%{buildroot}%{VAR_DIR}/graylist \
%{buildroot}%{BIN_LINK} \
%{buildroot}%{_sysconfdir} \
%{buildroot}%{_localstatedir}
%{__ln_s} ..%{CONF_DIR} %{buildroot}%{CONF_LINK}
%{__ln_s} ..%{VAR_DIR} %{buildroot}%{VAR_LINK}
touch %{buildroot}%{CONF_DIR}/blacklist_ip \
%{buildroot}%{CONF_DIR}/blacklist_rdns \
%{buildroot}%{CONF_DIR}/blacklist_recipients \
%{buildroot}%{CONF_DIR}/blacklist_senders \
%{buildroot}%{CONF_DIR}/whitelist_keywords \
%{buildroot}%{CONF_DIR}/whitelist_rdns \
%{buildroot}%{CONF_DIR}/whitelist_recipients \
%{buildroot}%{CONF_DIR}/whitelist_senders
%{__install} -p %{SOURCE1} %{buildroot}%{CONF_DIR}/.
%{__install} -p %{SOURCE2} %{buildroot}%{CONF_DIR}/.
%{__install} -p %{SOURCE3} %{buildroot}%{CONF_DIR}/.
%{__install} -p %{SOURCE4} %{buildroot}%{BIN_DIR}/.
%{__install} -p %{name}/%{name} %{buildroot}%{BIN_DIR}/.
%{__ln_s} ../..%{BIN_DIR}/sd-prune-graylist %{buildroot}%{BIN_LINK}/.
%{__ln_s} ../..%{BIN_DIR}/%{name} %{buildroot}%{BIN_LINK}/.
#-------------------------------------------------------------------------------
%files
#-------------------------------------------------------------------------------
%defattr(0644,root,root,0755)
%dir %{BASE_DIR}
%dir %{BIN_DIR}
%dir %{CONF_DIR}
%dir %{VAR_DIR}
%dir %{VAR_DIR}/graylist
%attr(0755,root,root) %{BIN_DIR}/*
%config(noreplace) %{CONF_DIR}/*
%{BIN_LINK}/%{name}
%{BIN_LINK}/sd-prune-graylist
%{CONF_LINK}
%{VAR_LINK}
#-------------------------------------------------------------------------------
%clean
#-------------------------------------------------------------------------------
rm -rf %{_builddir}/%{name}-%{version}
rm -rf %{buildroot}
#-------------------------------------------------------------------------------
%changelog
#-------------------------------------------------------------------------------
* Wed Jul 9 2014 Eric Shubert <[email protected]> 4.3.1-1.qt
- Changed logging to use syslog
* Sat Nov 23 2013 Eric Shubert <[email protected]> 4.3.1-0.qt
- Added sd-prune-graylist script to package
* Mon Oct 21 2013 Eric Shubert <[email protected]> 4.3.1-0
- Initial package, much of which taken from qtp-install-spamdyke script