summaryrefslogtreecommitdiff
path: root/recipes/squidguard/squidguard_1.4.bb
blob: 0a506a35b14178c8bbef0c803fb11a79d3fa2866 (plain)
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
DESCRIPTION = "Squid URL redirector"
HOMEPAGE = "http://www.squidguard.org/"
SECTION = "network"
DEPENDS = "virtual/db openldap mysql5 zlib"
RDEPENDS_${PN} += "squid"
LICENSE = "GPL"
PR = "r2"

SRC_URI = " \
	http://www.squidguard.org/Downloads/squidGuard-${PV}.tar.gz;name=tar \
	file://squidguard-1.4-no_header_checks.patch \
	file://squidguard-1.4-fix-parallel-build.patch \
	file://squidguard-cross-ldap.patch \
	file://squidguard-fix-CVE-2009-3700.patch \
	file://squidguard-fix-CVE-2009-3826.patch \
	file://squidGuard.conf \
	"
SRC_URI[tar.md5sum] = "de834150998c1386c30feae196f16b06"
SRC_URI[tar.sha256sum] = "0711ce60b8e2bbba107b980fed446a88df35e1584b39f079c0cae54a172c5141"

S = "${WORKDIR}/squidGuard-${PV}"

EXTRA_OECONF += " \
	--with-squiduser=nobody \
	--with-db=${STAGING_INCDIR}/.. \
	--with-sg-config=${sysconfdir}/squid/squidGuard.conf \
	--with-sg-logdir=${localstatedir}/log/squid \
	--with-sg-dbhome=${localstatedir}/lib/squidguard/db \
	--with-ldap=yes \
	--with-mysql=${STAGING_INCDIR}/.. \
	"

inherit autotools

do_configure_prepend() {
	export ac_cv_header_db_h=yes 
	export db_ok_version=yes
	export dbg3_ok_version=yes
	export dbg2_ok_version=yes
	cp src/config.h.in src/config.h.in.original
}

do_configure_append() {
	mv src/config.h.in.original src/config.h.in
	./config.status
}

do_install() {
	install -d ${D}${bindir}
	install -d ${D}${sysconfdir}/squid
	install -d ${D}${localstatedir}/log/squid
	install -d ${D}${localstatedir}/lib/squidguard/db
	install -m 0755 src/squidGuard ${D}${bindir}
	install -m 0644 ${WORKDIR}/squidGuard.conf ${D}${sysconfdir}/squid/squidGuard.conf
}