From deb0817baa1c130fc28b75b7f7595582bc1517bf Mon Sep 17 00:00:00 2001 From: jbu Date: Tue, 28 Apr 2015 09:46:11 +0200 Subject: [PATCH] New package: clamav-0.98.7 --- common/shlibs | 3 +++ srcpkgs/clamav-devel | 1 + srcpkgs/clamav/INSTALL | 15 +++++++++++++ srcpkgs/clamav/INSTALL.msg | 2 ++ srcpkgs/clamav/REMOVE | 11 ++++++++++ srcpkgs/clamav/template | 43 ++++++++++++++++++++++++++++++++++++++ 6 files changed, 75 insertions(+) create mode 120000 srcpkgs/clamav-devel create mode 100644 srcpkgs/clamav/INSTALL create mode 100644 srcpkgs/clamav/INSTALL.msg create mode 100644 srcpkgs/clamav/REMOVE create mode 100644 srcpkgs/clamav/template diff --git a/common/shlibs b/common/shlibs index 90052a3f1c2..fef4ea507d2 100644 --- a/common/shlibs +++ b/common/shlibs @@ -2003,3 +2003,6 @@ libsfml-system.so.2.2.0 SFML-2.2_1 libsfml-window.so.2.2.0 SFML-2.2_1 libsfml-audio.so.2.2.0 SFML-2.2_1 libsfml-graphics.so.2.2.0 SFML-2.2_1 +libclamav.so.6 clamav-0.98.6_1 +libclamunrar.so.6 clamav-0.98.6_1 +libclamunrar_iface.so.6 clamav-0.98.6_1 diff --git a/srcpkgs/clamav-devel b/srcpkgs/clamav-devel new file mode 120000 index 00000000000..bdc18496267 --- /dev/null +++ b/srcpkgs/clamav-devel @@ -0,0 +1 @@ +clamav \ No newline at end of file diff --git a/srcpkgs/clamav/INSTALL b/srcpkgs/clamav/INSTALL new file mode 100644 index 00000000000..d654b677ca7 --- /dev/null +++ b/srcpkgs/clamav/INSTALL @@ -0,0 +1,15 @@ +# INSTALL +case "$ACTION" in +post) + # Only if not updating + if [ "$UPDATE" != "yes" ]; then + # Create the database directory + mkdir -p /var/lib/clamav + # The clamav user owns it + chown -R clamav:clamav /var/lib/clamav + # Let group members write to it + chmod g+w /var/lib/clamav + fi + ;; +esac + diff --git a/srcpkgs/clamav/INSTALL.msg b/srcpkgs/clamav/INSTALL.msg new file mode 100644 index 00000000000..54e2c3f5c05 --- /dev/null +++ b/srcpkgs/clamav/INSTALL.msg @@ -0,0 +1,2 @@ +You may want to add your account to the group 'clamav'. +$ sudo usermod -a -G clamav diff --git a/srcpkgs/clamav/REMOVE b/srcpkgs/clamav/REMOVE new file mode 100644 index 00000000000..7e6bb0e41a5 --- /dev/null +++ b/srcpkgs/clamav/REMOVE @@ -0,0 +1,11 @@ +# REMOVE +case "$ACTION" in +pre) + # Only if not updating + if [ "$UPDATE" != "yes" ]; then + # Remove the clamav database directory and contents + rm -rf /var/lib/clamav + fi + ;; +esac + diff --git a/srcpkgs/clamav/template b/srcpkgs/clamav/template new file mode 100644 index 00000000000..233cff233c0 --- /dev/null +++ b/srcpkgs/clamav/template @@ -0,0 +1,43 @@ +# Template file for 'clamav' +pkgname=clamav +version=0.98.7 +revision=1 +build_style=gnu-configure +conf_files="/etc/clamd.conf /etc/freshclam.conf" +CPPFLAGS="-Wno-unused-local-typedefs" +system_accounts="clamav" +clamav_home="/var/lib/${pkgname}" +clamav_descr="ClamAV user" +hostmakedepends="pkg-config zip" +makedepends="libressl-devel libxml2-devel libcurl-devel ncurses-devel pcre-devel tcl-devel bzip2-devel zlib-devel" +short_desc="Clam Anti-Virus scanner" +maintainer="Jürgen Buchmüller " +license="GPL-2" +homepage="http://www.clamav.net/" +distfiles="${SOURCEFORGE_SITE}/${pkgname}/${pkgname}/${version}/${pkgname}-${version}.tar.gz" +checksum=282417b707740de13cd8f18d4cbca9ddd181cf96b444db2cad98913a5153e272 + +post_install() { + # Enable and patch clamd configuration + mv -v ${PKGDESTDIR}/etc/clamd.conf.sample ${PKGDESTDIR}/etc/clamd.conf + vsconf etc/clamd.conf.sample + sed -i ${PKGDESTDIR}/etc/clamd.conf \ + -e "s;^Example$;# Example;" \ + -e "s;#DatabaseDirectory.*;DatabaseDirectory /var/lib/${pkgname};" + + # Enable and patch freshclam configuration + mv -v ${PKGDESTDIR}/etc/freshclam.conf.sample ${PKGDESTDIR}/etc/freshclam.conf + vsconf etc/freshclam.conf.sample + sed -i ${PKGDESTDIR}/etc/freshclam.conf \ + -e "s;^Example$;# Example;" \ + -e "s;#DatabaseDirectory.*;DatabaseDirectory /var/lib/${pkgname};" +} +clamav-devel_package() { + depends="${sourcepkg}>=${version}_${revision}" + short_desc+=" - development files" + pkg_install() { + vmove usr/lib/pkgconfig + vmove usr/include + vmove "usr/lib/*.so" + } +}