diff options
Diffstat (limited to 'recipes-security/clamav/clamav_0.98.5.bb')
-rw-r--r-- | recipes-security/clamav/clamav_0.98.5.bb | 135 |
1 files changed, 135 insertions, 0 deletions
diff --git a/recipes-security/clamav/clamav_0.98.5.bb b/recipes-security/clamav/clamav_0.98.5.bb new file mode 100644 index 0000000..73c9ab2 --- /dev/null +++ b/recipes-security/clamav/clamav_0.98.5.bb | |||
@@ -0,0 +1,135 @@ | |||
1 | SUMMARY = "ClamAV anti-virus utility for Unix - command-line interface" | ||
2 | DESCRIPTION = "ClamAV is an open source antivirus engine for detecting trojans, viruses, malware & other malicious threats." | ||
3 | HOMEPAGE = "http://www.clamav.net/index.html" | ||
4 | SECTION = "security" | ||
5 | LICENSE = "LGPL-2.1" | ||
6 | DEPENDS = "libtool db openssl zlib ncurses bzip2" | ||
7 | |||
8 | LIC_FILES_CHKSUM = "file://COPYING.LGPL;beginline=2;endline=3;md5=4b89c05acc71195e9a06edfa2fa7d092" | ||
9 | |||
10 | SRC_URI = "${DEBIAN_MIRROR}/main/c/${BPN}/${BPN}_${PV}+dfsg.orig.tar.xz;name=archive \ | ||
11 | file://0001-Change-paths-in-sample-conf-file-to-match-Debian.patch \ | ||
12 | file://0002-Add-an-additional-n-after-the-number-in-the-pidfile.patch \ | ||
13 | file://0003-unit_tests-increment-test-timeout-from-40secs-to-5mi.patch \ | ||
14 | file://0004-Fix-compiling-on-Hurd.patch \ | ||
15 | file://0005-Workaround-a-bug-in-libc-on-Hurd.patch \ | ||
16 | file://0006-remove-unnecessary-harmful-flags-from-libclamav.pc.patch \ | ||
17 | file://0007-libclamav-use-libmspack.patch \ | ||
18 | file://0008-Add-upstream-systemd-support-for-clamav-daemon-and-c.patch \ | ||
19 | file://0009-fix-ssize_t-size_t-off_t-printf-modifier.patch \ | ||
20 | file://0010-hardcode-LLVM-linker-flag-because-llvm-config-return.patch \ | ||
21 | file://0011-Add-libmspack-library-from-upstream-without-unnecess.patch \ | ||
22 | file://0012-allow-to-use-internal-libmspack-if-the-external-is-n.patch \ | ||
23 | file://0013-fix-autoreconf-with-embedded-libmspack.patch \ | ||
24 | file://0014-remove-AC_CONFIG_SRCDIR-llvm-configure-from-libclama.patch \ | ||
25 | file://0015-bb-10731-Allow-to-specificy-a-group-for-the-socket-o.patch \ | ||
26 | file://0016-clamav-milter-add-additinal-SMFIF_-flags-before-invo.patch \ | ||
27 | file://0017-Bump-.so-version-number.patch \ | ||
28 | file://0018-llvm-don-t-use-system-libs.patch \ | ||
29 | file://clamav-0001-clamdscan.patch \ | ||
30 | file://clamd.conf \ | ||
31 | file://freshclam.conf \ | ||
32 | file://volatiles.03_clamav \ | ||
33 | " | ||
34 | |||
35 | SRC_URI[archive.md5sum] = "34d5e8698e57ce45c4a8c3c2cb211cf3" | ||
36 | SRC_URI[archive.sha256sum] = "0e353f646a0add17ca42e75ccfc7edf4f8b7c1acc972a86c317543f6b365db2d" | ||
37 | |||
38 | inherit autotools-brokensep pkgconfig useradd | ||
39 | |||
40 | S = "${WORKDIR}/${BPN}-${PV}+dfsg" | ||
41 | |||
42 | PACKAGECONFIG ??= "" | ||
43 | PACKAGECONFIG += " ${@bb.utils.contains("DISTRO_FEATURES", "ipv6", "ipv6", "", d)}" | ||
44 | PACKAGECONFIG[xml] = "--with-xml=${STAGING_LIBDIR}/.., --with-xml=no, libxml2," | ||
45 | PACKAGECONFIG[json] = "--with-libjson=${STAGING_LIBDIR}, --without-libjson, json," | ||
46 | PACKAGECONFIG[curl] = "--with-libcurl=${STAGING_LIBDIR}, --without-libcurl, curl," | ||
47 | PACKAGECONFIG[ipv6] = "--enable-ipv6, --disable-ipv6" | ||
48 | |||
49 | UID = "clamav" | ||
50 | GID = "clamav" | ||
51 | |||
52 | EXTRA_OECONF += " --with-user=${UID} --with-group=${GID} \ | ||
53 | --without-libcheck-prefix \ | ||
54 | --disable-unrar \ | ||
55 | --disable-llvm \ | ||
56 | --with-openssl=${STAGING_LIBDIR}/.. \ | ||
57 | --with-zlib=${STAGING_LIBDIR}/.. \ | ||
58 | --with-libbz2-prefix=${STAGING_DIR}${prefix} \ | ||
59 | --with-libcurses-prefix=${STAGING_LIBDIR}/.. \ | ||
60 | " | ||
61 | |||
62 | do_install_append () { | ||
63 | install -d ${D}/${sysconfdir} | ||
64 | install -d ${D}/${localstatedir}/lib/clamav | ||
65 | install -d ${D}${sysconfdir}/clamav ${D}${sysconfdir}/default/volatiles | ||
66 | |||
67 | install -m 644 ${WORKDIR}/clamd.conf ${D}/${sysconfdir} | ||
68 | install -m 644 ${WORKDIR}/freshclam.conf ${D}/${sysconfdir} | ||
69 | install -m 0644 ${WORKDIR}/volatiles.03_clamav ${D}${sysconfdir}/default/volatiles/volatiles.03_clamav | ||
70 | } | ||
71 | |||
72 | pkg_postinst_${PN} () { | ||
73 | if [ -z "$D" ] && [ -e /etc/init.d/populate-volatile.sh ] ; then | ||
74 | ${sysconfdir}/init.d/populate-volatile.sh update | ||
75 | fi | ||
76 | chown ${UID}:${GID} ${localstatedir}/lib/clamav | ||
77 | } | ||
78 | |||
79 | |||
80 | PACKAGES = "${PN} ${PN}-dev ${PN}-dbg ${PN}-daemon ${PN}-doc \ | ||
81 | ${PN}-clamdscan ${PN}-freshclam ${PN}-libclamav6 ${PN}-staticdev" | ||
82 | |||
83 | FILES_${PN} = "${bindir}/clambc ${bindir}/clamscan ${bibdir}/clamsubmit \ | ||
84 | ${bindir}/sigtool ${mandir}/man1/clambc* ${mandir}/man1/clamscan* \ | ||
85 | ${mandir}/man1/sigtool* ${mandir}/man1/clambsubmit* \ | ||
86 | ${docdir}/clamav/* " | ||
87 | |||
88 | FILES_${PN}-clamdscan = " ${bindir}/clamdscan \ | ||
89 | ${docdir}/clamdscan/* \ | ||
90 | ${mandir}/man1/clamdscan* \ | ||
91 | " | ||
92 | |||
93 | FILES_${PN}-daemon = "${bindir}/clamconf ${bindir}/clamdtop ${sbindir}/clamd \ | ||
94 | ${mandir}/man1/clamconf* ${mandir}/man1/clamdtop* \ | ||
95 | ${mandir}/man5/clamd* ${mandir}/man8/clamd* \ | ||
96 | ${sysconfdir}/clamd.conf* \ | ||
97 | ${systemd_unitdir}/system/clamav-daemon/* \ | ||
98 | ${docdir}/clamav-daemon/* ${sysconfdir}/clamav-daemon \ | ||
99 | ${sysconfdir}/logcheck/ignore.d.server/clamav-daemon " | ||
100 | |||
101 | FILES_${PN}-freshclam = "${bindir}/freshclam \ | ||
102 | ${sysconfdir}/freshclam.conf* \ | ||
103 | ${sysconfdir}/clamav ${sysconfdir}/default/volatiles \ | ||
104 | ${localstatedir}/lib/clamav \ | ||
105 | ${docdir}/${PN}-freshclam ${mandir}/man1/freshclam.* \ | ||
106 | ${mandir}/man5/freshclam.conf.*" | ||
107 | |||
108 | FILES_${PN}-dev = " ${bindir}/clamav-config ${libdir}/*.la \ | ||
109 | ${libdir}/pkgconfig/*.pc \ | ||
110 | ${mandir}/man1/clamav-config.* \ | ||
111 | ${includedir}/*.h ${docdir}/libclamav* " | ||
112 | |||
113 | FILES_${PN}-staticdev = "${libdir}/*.a" | ||
114 | |||
115 | FILES_${PN}-libclamav6 = "${libdir}/libclamav.so* ${libdir}/libmspack.so*\ | ||
116 | ${docdir}/libclamav6/* " | ||
117 | |||
118 | FILES_${PN}-doc = "${mandir}/man/* \ | ||
119 | ${datadir}/man/* \ | ||
120 | ${docdir}/* " | ||
121 | |||
122 | INSANE_SKIP_${PN}-libclamav6 = "dev-so" | ||
123 | |||
124 | USERADD_PACKAGES = "${PN}" | ||
125 | GROUPADD_PARAM_${PN} = "--system ${UID}" | ||
126 | USERADD_PARAM_${PN} = "--system -g ${GID} --home-dir \ | ||
127 | ${localstatedir}/spool/${BPN} \ | ||
128 | --no-create-home --shell /bin/false ${BPN}" | ||
129 | |||
130 | RPROVIDES_${PN} += "${PN}-systemd" | ||
131 | RREPLACES_${PN} += "${PN}-systemd" | ||
132 | RCONFLICTS_${PN} += "${PN}-systemd" | ||
133 | SYSTEMD_SERVICE_${PN} = "${BPN}.service" | ||
134 | |||
135 | RDEPENDS_${PN} += "openssl ncurses-libncurses libbz2 ncurses-libtinfo clamav-freshclam clamav-libclamav6" | ||