1 | Summary: An anti-spam SMTP proxy
|
---|
2 | Name: hermes
|
---|
3 | Version: 1.6
|
---|
4 | Release: 4%{?dist}
|
---|
5 | License: GPL
|
---|
6 | Group: System Environment/Daemons
|
---|
7 | Packager: Veit Wahlich <cru@zodia.de>
|
---|
8 | URL: http://www.hermes-project.com/
|
---|
9 | Source0: http://www.iteisa.com/files/%{name}-%{version}.tar.gz
|
---|
10 | Source1: %{name}-os2.zip
|
---|
11 |
|
---|
12 | Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root
|
---|
13 |
|
---|
14 | BuildRequires: sqlite-devel
|
---|
15 | BuildRequires: openssl-devel
|
---|
16 | BuildRequires: libspf2-devel
|
---|
17 | BuildRequires: exceptq-devel
|
---|
18 | BuildRequires: perl
|
---|
19 |
|
---|
20 | Patch1: hermes-os2.diff
|
---|
21 |
|
---|
22 | %description
|
---|
23 | hermes is a generic, lightweight, portable and fast anti-spam smtp proxy.
|
---|
24 | Supports greylisting, dns blacklisting/whitelisting, protocol throttling, banner delaying, spf and some
|
---|
25 | other tricks to reject most spam before it even enters your system.
|
---|
26 |
|
---|
27 | %prep
|
---|
28 | %setup -q -a1
|
---|
29 | %patch001 -p1 -b .os2~
|
---|
30 |
|
---|
31 | %build
|
---|
32 | export CONFIG_SHELL="/bin/sh" ; \
|
---|
33 | export LDFLAGS="-Zbin-files -Zhigh-mem -Zomf -Zargs-wild -Zargs-resp" ; \
|
---|
34 | export LIBS="-lurpo -lmmap -lpthread" ; \
|
---|
35 | %configure --docdir=%{_datadir}/doc/%{name}-%{version} \
|
---|
36 | --disable-dependency-tracking \
|
---|
37 | --enable-spf --with-logger-module=file \
|
---|
38 | --enable-shared --disable-static \
|
---|
39 | "--cache-file=%{_topdir}/cache/%{name}-%{_target_cpu}.cache"
|
---|
40 |
|
---|
41 | %__make %{?_smp_mflags}
|
---|
42 |
|
---|
43 | %install
|
---|
44 | %__rm -rf %{buildroot}
|
---|
45 | %__make DESTDIR=%{buildroot} install
|
---|
46 | %__mkdir_p %{buildroot}%{_sysconfdir}/rc.d/init.d
|
---|
47 | %__mkdir_p %{buildroot}%{_sysconfdir}/hermes
|
---|
48 | %__mkdir_p %{buildroot}%{_localstatedir}/hermes
|
---|
49 | %__install -m 0755 dists/fc_init %{buildroot}%{_sysconfdir}/rc.d/init.d/hermes
|
---|
50 | %__install -m 0600 dists/hermesrc.example %{buildroot}%{_sysconfdir}/hermes/hermesrc
|
---|
51 |
|
---|
52 | %clean
|
---|
53 | %__rm -rf %{buildroot}
|
---|
54 |
|
---|
55 | #%post
|
---|
56 | #/sbin/chkconfig --add hermes
|
---|
57 |
|
---|
58 | #%preun
|
---|
59 | #if [ $1 = 0 ]; then # execute this only if we are NOT doing an upgrade
|
---|
60 | # %{_sysconfdir}/rc.d/init.d/hermes stop >/dev/null 2>&1
|
---|
61 | # /sbin/chkconfig --del hermes
|
---|
62 | #fi
|
---|
63 | #exit 0
|
---|
64 |
|
---|
65 | %post
|
---|
66 | %wps_object_create_begin
|
---|
67 | HERMES_FOLDER:WPFolder|Hermes %version|<WP_DESKTOP>|TITLE=Hermes %version;
|
---|
68 | HERMES_README:WPShadow|Readme 1st|<HERMES_FOLDER>|SHADOWID=((%_defaultdocdir/%name-%version/ReadMe.txt))
|
---|
69 | HERMES_OPTIONS:WPShadow|Options|<HERMES_FOLDER>|SHADOWID=((%_defaultdocdir/%name-%version/hermes-options.html))
|
---|
70 | HERMES_CONFIG:WPShadow|Options|<HERMES_FOLDER>|SHADOWID=((%_sysconfdir/hermes/hermesrc))
|
---|
71 | HERMES_DAEMON:WPProgram|Hermes daemon|<HERMES_FOLDER>|EXENAME=((%_bindir/hermes.exe));STARTUPDIR=((%_bindir));ICONFILE=((%_defaultdocdir/%name-%version/hermes.ico));TITLE=Hermes daemon;
|
---|
72 | %wps_object_create_end
|
---|
73 |
|
---|
74 | %postun
|
---|
75 | %wps_object_delete_all
|
---|
76 |
|
---|
77 | %files
|
---|
78 | %defattr(-, root, root, 0755)
|
---|
79 | %doc ChangeLog TODO AUTHORS dists/hermesrc.example docs/hermes-options.html docs/installing-hermes.txt docs/gpl.txt
|
---|
80 | %doc ReadMe.txt rotate.cmd white_host.cmd white_ips.cmd hermes.ico
|
---|
81 | %{_bindir}/hermes.exe
|
---|
82 | %{_sysconfdir}/rc.d/init.d/hermes
|
---|
83 | %config %{_sysconfdir}/hermes/hermesrc
|
---|
84 | %dir %attr(0700,nobody,nobody) %{_localstatedir}/hermes
|
---|
85 |
|
---|
86 | %changelog
|
---|