1 | %bcond_with libclamav |
---|
2 | |
---|
3 | %define clamav_version 0.96 |
---|
4 | |
---|
5 | Summary: HAVP - HTTP Anti Virus Proxy |
---|
6 | Name: havp |
---|
7 | Version: 0.92a |
---|
8 | Release: 5%{_dist_release} |
---|
9 | License: GPL |
---|
10 | Group: Applications/System |
---|
11 | URL: http://www.server-side.de/ |
---|
12 | Source0: http://www.server-side.de/download/havp-%{version}.tar.gz |
---|
13 | Patch0: havp.patch |
---|
14 | BuildRequires: libstdc++-devel, zlib-devel, bzip2-devel |
---|
15 | BuildRequires: gmp-devel, openssl-devel |
---|
16 | BuildRequires: clamav-devel => %{clamav_version} |
---|
17 | BuildRoot: %{_tmppath}/%{name}-%{version}-root/ |
---|
18 | #Requires: libstdc++, zlib, bzip2, gmp |
---|
19 | Requires: clamav => %{clamav_version} |
---|
20 | Vendor: Project Vine |
---|
21 | Distribution: Vine Linux |
---|
22 | Packager: tomop |
---|
23 | |
---|
24 | |
---|
25 | %description |
---|
26 | HAVP (HTTP AntiVirus proxy) is a proxy with an anti-virus filter. |
---|
27 | It does not cache or filter content. At the moment the complete |
---|
28 | traffic is scanned. The reason for this is the chance of malicious |
---|
29 | code in nearly every filetype e.g. HTML (JavaScript) or Jpeg. I aim |
---|
30 | to stop especially dialer or browser exploits. But writing a http |
---|
31 | Anti Virus Proxy is a real dilemma! Huge downloads are a problem |
---|
32 | for virus scanning proxies. A Client should not receive data which |
---|
33 | is unchecked by the virus scanner, but big downloads should not timeout. |
---|
34 | |
---|
35 | %prep |
---|
36 | |
---|
37 | %setup -q |
---|
38 | %patch0 -p0 |
---|
39 | #%patch1 -p1 |
---|
40 | |
---|
41 | %build |
---|
42 | export CFLAGS="%{optflags} -std=c++0x" |
---|
43 | export CXXFLAGS="%{optflags} -std=c++0x" |
---|
44 | |
---|
45 | %configure \ |
---|
46 | %if %{with libclamav} |
---|
47 | --with-scanner=libclamav \ |
---|
48 | %else |
---|
49 | --disable-clamav \ |
---|
50 | %endif |
---|
51 | --enable-ssl-tunnel |
---|
52 | |
---|
53 | make %{?_smp_mflags} |
---|
54 | |
---|
55 | %install |
---|
56 | rm -rf %{buildroot} |
---|
57 | mkdir -p %{buildroot}%{_sbindir} |
---|
58 | mkdir -p %{buildroot}%{_sysconfdir}/havp/templates |
---|
59 | mkdir -p %{buildroot}%{_localstatedir}/log/havp |
---|
60 | mkdir -p %{buildroot}%{_localstatedir}/tmp/havp |
---|
61 | mkdir -p %{buildroot}%{_localstatedir}/run/havp |
---|
62 | mkdir -p %{buildroot}%{_initdir} |
---|
63 | |
---|
64 | install -m755 havp/havp %{buildroot}%{_sbindir} |
---|
65 | install -m755 etc/init.d/havp %{buildroot}%{_initdir} |
---|
66 | install -m644 etc/havp/havp.config %{buildroot}%{_sysconfdir}/havp/havp.config |
---|
67 | install -m644 etc/havp/whitelist %{buildroot}%{_sysconfdir}/havp/whitelist |
---|
68 | install -m644 etc/havp/blacklist %{buildroot}%{_sysconfdir}/havp/blacklist |
---|
69 | cp -r etc/havp/templates/* %{buildroot}%{_sysconfdir}/havp/templates |
---|
70 | chmod -R a+rX %{buildroot}/etc/havp/templates |
---|
71 | |
---|
72 | %clean |
---|
73 | rm -rf %{buildroot} |
---|
74 | |
---|
75 | %pre |
---|
76 | if ! grep -q '^havp:' /etc/group; then |
---|
77 | /usr/sbin/groupadd -r havp |
---|
78 | fi |
---|
79 | if ! grep -q '^havp:' /etc/passwd; then |
---|
80 | /usr/sbin/useradd -M -r -s /sbin/nologin -g havp havp || : |
---|
81 | fi |
---|
82 | |
---|
83 | %postun |
---|
84 | /sbin/ldconfig |
---|
85 | if [ $1 = 0 ]; then |
---|
86 | if [ `grep havp /etc/passwd | wc -l` = 1 ]; then |
---|
87 | /usr/sbin/userdel havp |
---|
88 | fi |
---|
89 | if [ `grep havp /etc/group | wc -l` = 1 ]; then |
---|
90 | /usr/sbin/groupdel havp |
---|
91 | fi |
---|
92 | fi |
---|
93 | |
---|
94 | %post -p /sbin/ldconfig |
---|
95 | |
---|
96 | %files |
---|
97 | %defattr(-,root,root,-) |
---|
98 | %doc INSTALL COPYING ChangeLog |
---|
99 | %{_initdir}/havp |
---|
100 | %{_sbindir}/havp |
---|
101 | %config(noreplace) %{_sysconfdir}/havp/havp.config |
---|
102 | %config(noreplace) %{_sysconfdir}/havp/whitelist |
---|
103 | %config(noreplace) %{_sysconfdir}/havp/blacklist |
---|
104 | %{_sysconfdir}/havp/templates/* |
---|
105 | %attr(750,havp,havp) %dir /var/log/havp |
---|
106 | %attr(750,havp,havp) %dir /var/tmp/havp |
---|
107 | %attr(750,havp,havp) %dir /var/run/havp |
---|
108 | |
---|
109 | %changelog |
---|
110 | * Sat Dec 08 2018 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 0.92a-5 |
---|
111 | - disabled libclamav support. |
---|
112 | |
---|
113 | * Wed Jun 29 2016 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 0.92a-4 |
---|
114 | - rebuilt with new toolchain. |
---|
115 | |
---|
116 | * Thu Dec 3 2015 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 0.92a-3 |
---|
117 | - built with clamav-0.99. |
---|
118 | |
---|
119 | * Sun Jan 12 2014 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 0.92a-2 |
---|
120 | - rebuilt with current environment. |
---|
121 | |
---|
122 | * Sun Dec 05 2010 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 0.92a-1 |
---|
123 | - new upstream release. |
---|
124 | |
---|
125 | * Sat Nov 06 2010 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 0.92-1 |
---|
126 | - new upstream release. |
---|
127 | |
---|
128 | * Thu Jun 11 2009 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 0.90-1 |
---|
129 | - new upstream release. |
---|
130 | |
---|
131 | * Tue Mar 24 2009 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 0.89-1 |
---|
132 | - new upstream release. |
---|
133 | - built with clamav-0.95. |
---|
134 | |
---|
135 | * Tue Apr 15 2008 Tomohiro 'Tomo-p' KATO <tomop@teamgedoh.net> 0.87-2 |
---|
136 | - rebuild with clamav-0.93. |
---|
137 | |
---|
138 | * Mon Apr 14 2008 Tomohiro 'Tomo-p' KATO <tomop@teamgedoh.net> 0.87-1 |
---|
139 | - rebuilt with VineSeed. |
---|
140 | |
---|
141 | * Sat Mar 1 2008 Tomohiro 'Tomo-p' KATO <tomop@teamgedoh.net> 0.87-0vl1 |
---|
142 | - new upstream release. |
---|
143 | |
---|
144 | * Sun Mar 11 2007 Tomohiro 'Tomo-p' KATO <tomop@teamgedoh.net> 0.85-0vl2 |
---|
145 | - built with clamav-0.90.1. |
---|
146 | |
---|
147 | * Mon Feb 26 2007 Tomohiro 'Tomo-p' KATO <tomop@teamgedoh.net> 0.85-0vl1 |
---|
148 | - new upstream release. |
---|
149 | |
---|
150 | * Thu Oct 19 2006 Tomohiro 'Tomo-p' KATO <tomop@teamgedoh.net> 0.82-0vl1 |
---|
151 | - new upstream release. |
---|
152 | |
---|
153 | * Thu Jul 20 2006 Tomohiro 'Tomo-p' KATO <tomop@teamgedoh.net> 0.81-0vl1 |
---|
154 | - initial build. |
---|