1 DESCRIPTION = "HAVP (HTTP Antivirus Proxy) is a proxy with a ClamAV \
2 anti-virus scanner. The main aims are continuous, non-blocking \
3 downloads and smooth scanning of dynamic and password protected HTTP \
4 traffic. Havp antivirus proxy has a parent and transparent proxy \
5 mode. It can be used with squid or standalone."
6 HOMEPAGE = "http://www.server-side.de"
10 RDEPENDS_${PN} += "${PN}-templates-css2 ${PN}-templates-en"
12 SRC_URI = "http://www.server-side.de/download/havp-${PV}.tar.gz \
14 file://doc.configure.txt \
15 file://volatiles.05_havp"
17 inherit autotools update-rc.d
19 EXTRA_OECONF = "--with-scanner=libclamav"
21 do_configure_append () {
22 # Change the paths for /usr/local/etc (patch was applied to change them)
23 # And enable clamav as the scanner that is to be used.
24 sed -e 's:ENABLECLAMLIB false:ENABLECLAMLIB true:' \
25 -e 's:/usr/local/etc:/etc:' \
26 etc/havp/havp.config > etc/havp/havp.config.oe
29 install -m 0755 -d ${D}${sbindir} ${D}${sysconfdir}/havp \
30 ${D}${sysconfdir}/init.d ${D}${docdir}/havp \
31 ${D}${sysconfdir}/default/volatiles
32 install -m 755 havp/havp ${D}${sbindir}
33 install -m 755 ${WORKDIR}/havp.init ${D}${sysconfdir}/init.d/havp
34 install -m 755 INSTALL ${D}${docdir}/havp
35 install -m 755 ${WORKDIR}/doc.configure.txt ${D}${docdir}/havp/configure.txt
36 install -m 644 etc/havp/havp.config.oe ${D}${sysconfdir}/havp/havp.config
37 install -m 644 etc/havp/havp.config.oe ${D}${docdir}/havp/havp.config.default
39 for i in whitelist blacklist; do
40 install -m 644 etc/havp/$i ${D}${sysconfdir}/havp/$i
42 cp -r etc/havp/templates ${D}${sysconfdir}/havp
43 chmod -R a+rX ${D}${sysconfdir}/havp/templates
45 # We need some /var directories
47 install -m 0644 ${WORKDIR}/volatiles.$i ${D}${sysconfdir}/default/volatiles/$i
51 PACKAGES = "${PN}-dbg ${PN}-doc \
52 ${PN}-templates-br ${PN}-templates-css2 ${PN}-templates-de \
53 ${PN}-templates-en ${PN}-templates-es ${PN}-templates-fr \
54 ${PN}-templates-it ${PN}-templates-nl ${PN}-templates-pf \
55 ${PN}-templates-pl ${PN}-templates-ru ${PN}-templates-sv \
58 FILES_${PN} = "${sysconfdir}/havp/blacklist ${sysconfdir}/havp/whitelist \
59 ${sysconfdir}/havp/havp.config* \
60 ${sysconfdir}/init.d ${sysconfdir}/default ${sbindir}/*"
61 FILES_${PN}-templates-br = "${sysconfdir}/havp/templates/br"
62 FILES_${PN}-templates-css2 = "${sysconfdir}/havp/templates/css2"
63 FILES_${PN}-templates-de = "${sysconfdir}/havp/templates/de"
64 FILES_${PN}-templates-en = "${sysconfdir}/havp/templates/en"
65 FILES_${PN}-templates-es = "${sysconfdir}/havp/templates/es"
66 FILES_${PN}-templates-fr = "${sysconfdir}/havp/templates/fr"
67 FILES_${PN}-templates-it = "${sysconfdir}/havp/templates/it"
68 FILES_${PN}-templates-nl = "${sysconfdir}/havp/templates/nl"
69 FILES_${PN}-templates-pf = "${sysconfdir}/havp/templates/pf"
70 FILES_${PN}-templates-pl = "${sysconfdir}/havp/templates/pl"
71 FILES_${PN}-templates-ru = "${sysconfdir}/havp/templates/ru"
72 FILES_${PN}-templates-sv = "${sysconfdir}/havp/templates/sv"
74 # Add havp's user and groups
75 pkg_postinst_${PN} () {
76 grep -q havp: /etc/group || addgroup havp
77 grep -q havp: /etc/passwd || \
78 adduser --disabled-password --home=${localstatedir}/lib/havp/ --system \
79 --ingroup havp --no-create-home -g "HAVP" havp
80 /etc/init.d/populate-volatile.sh update
83 CONFFILES_${PN} = "${sysconfdir}/havp/havp.config \
84 ${sysconfdir}/havp/blacklist ${sysconfdir}/havp/whitelist"
86 INITSCRIPT_NAME = "havp"
87 INITSCRIPT_PARAMS = "defaults 55 45"