summaryrefslogtreecommitdiffstats
path: root/recipes-security/clamav/clamav_0.99.3.bb
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-security/clamav/clamav_0.99.3.bb')
-rw-r--r--recipes-security/clamav/clamav_0.99.3.bb153
1 files changed, 153 insertions, 0 deletions
diff --git a/recipes-security/clamav/clamav_0.99.3.bb b/recipes-security/clamav/clamav_0.99.3.bb
new file mode 100644
index 0000000..2b07d69
--- /dev/null
+++ b/recipes-security/clamav/clamav_0.99.3.bb
@@ -0,0 +1,153 @@
1SUMMARY = "ClamAV anti-virus utility for Unix - command-line interface"
2DESCRIPTION = "ClamAV is an open source antivirus engine for detecting trojans, viruses, malware & other malicious threats."
3HOMEPAGE = "http://www.clamav.net/index.html"
4SECTION = "security"
5LICENSE = "LGPL-2.1"
6
7DEPENDS = "libtool db libmspack chrpath-replacement-native"
8
9LIC_FILES_CHKSUM = "file://COPYING.LGPL;beginline=2;endline=3;md5=4b89c05acc71195e9a06edfa2fa7d092"
10
11SRCREV = "224f73461a44e278e9fa50ba59f51ee5e64373e0"
12
13SRC_URI = "git://github.com/vrtadmin/clamav-devel;branch=rel/0.99 \
14 file://clamd.conf \
15 file://freshclam.conf \
16 file://volatiles.03_clamav \
17 "
18
19S = "${WORKDIR}/git"
20
21LEAD_SONAME = "libclamav.so"
22SO_VER = "7.1.1"
23
24EXTRANATIVEPATH += "chrpath-native"
25
26inherit autotools-brokensep pkgconfig useradd systemd
27
28UID = "clamav"
29GID = "clamav"
30
31# Clamav has a built llvm version 2 but does not build with gcc 6.x,
32# disable the internal one. This is a known issue
33# If you want LLVM support, use meta-oe llvm3.3 to build for GCC 6.X,
34# as defined below
35
36CLAMAV_LLVM ?= "oellvm"
37CLAMAV_LLVM_RELEASE ?= "5.0"
38
39PACKAGECONFIG ?= "ncurses openssl bz2 zlib ${CLAMAV_LLVM}"
40PACKAGECONFIG += " ${@bb.utils.contains("DISTRO_FEATURES", "ipv6", "ipv6", "", d)}"
41PACKAGECONFIG += "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', '', d)}"
42
43PACKAGECONFIG[oellvm] = "--with-system-llvm --with-llvm-linking=dynamic --disable-llvm, ,llvm${CLAMAV_LLVM_RELEASE}"
44
45PACKAGECONFIG[pcre] = "--with-pcre=${STAGING_LIBDIR}, --without-pcre, libpcre"
46PACKAGECONFIG[xml] = "--with-xml=${STAGING_LIBDIR}/.., --with-xml=no, libxml2,"
47PACKAGECONFIG[json] = "--with-libjson=${STAGING_LIBDIR}, --without-libjson, json,"
48PACKAGECONFIG[curl] = "--with-libcurl=${STAGING_LIBDIR}, --without-libcurl, curl,"
49PACKAGECONFIG[ipv6] = "--enable-ipv6, --disable-ipv6"
50PACKAGECONFIG[openssl] = "--with-openssl=${STAGING_DIR_HOST}/usr, --without-openssl, openssl, openssl"
51PACKAGECONFIG[zlib] = "--with-zlib=${STAGING_DIR_HOST}/usr --disable-zlib-vcheck , --without-zlib, zlib, "
52PACKAGECONFIG[bz2] = "--with-libbz2-prefix=${STAGING_LIBDIR}/.., --without-libbz2-prefix, "
53PACKAGECONFIG[ncurses] = "--with-libncurses-prefix=${STAGING_LIBDIR}/.., --without-libncurses-prefix, ncurses, "
54PACKAGECONFIG[systemd] = "--with-systemdsystemunitdir=${systemd_unitdir}/system/, --without-systemdsystemunitdir, "
55
56EXTRA_OECONF += " --with-user=${UID} --with-group=${GID} \
57 --without-libcheck-prefix --disable-unrar \
58 --disable-mempool \
59 --program-prefix="" \
60 --disable-yara \
61 --disable-rpath \
62 "
63
64do_configure () {
65 cd ${S}
66 ./configure ${CONFIGUREOPTS} ${EXTRA_OECONF}
67}
68
69do_compile_append() {
70 # brute force removing RPATH
71 chrpath -d ${B}/libclamav/.libs/libclamav.so.${SO_VER}
72 chrpath -d ${B}/sigtool/.libs/sigtool
73 chrpath -d ${B}/clambc/.libs/clambc
74 chrpath -d ${B}/clamscan/.libs/clamscan
75 chrpath -d ${B}/clamconf/.libs/clamconf
76 chrpath -d ${B}/clamd/.libs/clamd
77 chrpath -d ${B}/freshclam/.libs/freshclam
78}
79
80do_install_append() {
81 install -d ${D}/${sysconfdir}
82 install -d ${D}/${localstatedir}/lib/clamav
83 install -d ${D}${sysconfdir}/clamav ${D}${sysconfdir}/default/volatiles
84
85 install -m 644 ${WORKDIR}/clamd.conf ${D}/${sysconfdir}
86 install -m 644 ${WORKDIR}/freshclam.conf ${D}/${sysconfdir}
87 install -m 0644 ${WORKDIR}/volatiles.03_clamav ${D}${sysconfdir}/default/volatiles/volatiles.03_clamav
88 sed -i -e 's#${STAGING_DIR_HOST}##g' ${D}${libdir}/pkgconfig/libclamav.pc
89 rm ${D}/${libdir}/libclamav.so
90}
91
92pkg_postinst_${PN} () {
93 if [ -z "$D" ] && [ -e /etc/init.d/populate-volatile.sh ] ; then
94 ${sysconfdir}/init.d/populate-volatile.sh update
95 fi
96 chown ${UID}:${GID} ${localstatedir}/lib/clamav
97}
98
99
100PACKAGES = "${PN} ${PN}-dev ${PN}-dbg ${PN}-daemon ${PN}-doc \
101 ${PN}-clamdscan ${PN}-freshclam ${PN}-libclamav ${PN}-staticdev"
102
103FILES_${PN} = "${bindir}/clambc ${bindir}/clamscan ${bindir}/clamsubmit \
104 ${bindir}/*sigtool ${mandir}/man1/clambc* ${mandir}/man1/clamscan* \
105 ${mandir}/man1/sigtool* ${mandir}/man1/clambsubmit* \
106 ${docdir}/clamav/* "
107
108FILES_${PN}-clamdscan = " ${bindir}/clamdscan \
109 ${docdir}/clamdscan/* \
110 ${mandir}/man1/clamdscan* \
111 "
112
113FILES_${PN}-daemon = "${bindir}/clamconf ${bindir}/clamdtop ${sbindir}/clamd \
114 ${mandir}/man1/clamconf* ${mandir}/man1/clamdtop* \
115 ${mandir}/man5/clamd* ${mandir}/man8/clamd* \
116 ${sysconfdir}/clamd.conf* \
117 ${systemd_unitdir}/system/clamav-daemon/* \
118 ${docdir}/clamav-daemon/* ${sysconfdir}/clamav-daemon \
119 ${sysconfdir}/logcheck/ignore.d.server/clamav-daemon "
120
121FILES_${PN}-freshclam = "${bindir}/freshclam \
122 ${sysconfdir}/freshclam.conf* \
123 ${sysconfdir}/clamav ${sysconfdir}/default/volatiles \
124 ${localstatedir}/lib/clamav \
125 ${docdir}/${PN}-freshclam ${mandir}/man1/freshclam.* \
126 ${mandir}/man5/freshclam.conf.*"
127
128FILES_${PN}-dev = " ${bindir}/clamav-config ${libdir}/*.la \
129 ${libdir}/pkgconfig/*.pc \
130 ${mandir}/man1/clamav-config.* \
131 ${includedir}/*.h ${docdir}/libclamav* "
132
133FILES_${PN}-staticdev = "${libdir}/*.a"
134
135FILES_${PN}-libclamav = "${libdir}/libclamav.so* ${libdir}/libmspack.so*\
136 ${docdir}/libclamav/* "
137
138FILES_${PN}-doc = "${mandir}/man/* \
139 ${datadir}/man/* \
140 ${docdir}/* "
141
142USERADD_PACKAGES = "${PN}"
143GROUPADD_PARAM_${PN} = "--system ${UID}"
144USERADD_PARAM_${PN} = "--system -g ${GID} --home-dir \
145 ${localstatedir}/spool/${BPN} \
146 --no-create-home --shell /bin/false ${BPN}"
147
148RPROVIDES_${PN} += "${PN}-systemd"
149RREPLACES_${PN} += "${PN}-systemd"
150RCONFLICTS_${PN} += "${PN}-systemd"
151SYSTEMD_SERVICE_${PN} = "${BPN}.service"
152
153RDEPENDS_${PN} += "openssl ncurses-libncurses libbz2 ncurses-libtinfo clamav-freshclam clamav-libclamav"