2015-04-28 09:46:11 +02:00
|
|
|
# Template file for 'clamav'
|
|
|
|
pkgname=clamav
|
2015-12-02 10:45:41 +01:00
|
|
|
version=0.99.0
|
2015-12-02 11:09:33 +01:00
|
|
|
revision=2
|
2015-12-02 10:45:41 +01:00
|
|
|
wrksrc=${pkgname}-${version%.*}
|
2015-04-28 09:46:11 +02:00
|
|
|
build_style=gnu-configure
|
2015-06-02 18:27:06 +02:00
|
|
|
configure_args="--sbindir=/usr/bin --with-pcre=/usr"
|
2015-04-28 09:46:11 +02:00
|
|
|
conf_files="/etc/clamd.conf /etc/freshclam.conf"
|
|
|
|
system_accounts="clamav"
|
2015-04-29 12:58:41 +02:00
|
|
|
clamav_homedir="/var/lib/${pkgname}"
|
2015-04-28 09:46:11 +02:00
|
|
|
clamav_descr="ClamAV user"
|
|
|
|
hostmakedepends="pkg-config zip"
|
2015-12-02 10:45:41 +01:00
|
|
|
makedepends="libressl-devel libxml2-devel libcurl-devel ncurses-devel pcre-devel
|
|
|
|
tcl-devel bzip2-devel zlib-devel"
|
2015-04-28 09:46:11 +02:00
|
|
|
short_desc="Clam Anti-Virus scanner"
|
|
|
|
maintainer="Jürgen Buchmüller <pullmoll@t-online.de>"
|
|
|
|
license="GPL-2"
|
|
|
|
homepage="http://www.clamav.net/"
|
2015-12-02 10:45:41 +01:00
|
|
|
# Strangely the publish an archive without the subminor version
|
|
|
|
distfiles="http://www.clamav.net/downloads/production/${wrksrc}.tar.gz"
|
|
|
|
checksum=d2792c8cfadd685fffc40b2199679628815df031fd3149ccf961649fc8787ea9
|
2015-08-06 21:14:58 +02:00
|
|
|
|
2015-07-19 10:45:03 +02:00
|
|
|
CPPFLAGS="-Wno-unused-local-typedefs"
|
2015-12-02 10:45:41 +01:00
|
|
|
if [ "$CROSS_BUILD" ]; then
|
|
|
|
configure_args+=" --with-openssl=${XBPS_CROSS_BASE}/usr"
|
|
|
|
configure_args+=" --with-pcre=${XBPS_CROSS_BASE}/usr"
|
|
|
|
configure_args+=" --with-zlib=${XBPS_CROSS_BASE}/usr"
|
|
|
|
configure_args+=" --disable-mempool"
|
|
|
|
fi
|
2015-12-02 11:09:33 +01:00
|
|
|
case "$XBPS_TARGET_MACHINE" in
|
2015-12-17 14:22:32 +01:00
|
|
|
*-musl) makedepends+=" musl-fts-devel"
|
2015-12-02 11:09:33 +01:00
|
|
|
LDFLAGS="-lfts"
|
|
|
|
;;
|
|
|
|
esac
|
2015-07-19 10:45:03 +02:00
|
|
|
|
2015-04-29 18:15:14 +02:00
|
|
|
do_configure() {
|
2015-12-02 11:09:33 +01:00
|
|
|
# Disable detection of sys/cdefs.h (it's obsolete)
|
|
|
|
sed -i configure -e 's; sys/cdefs\.h$;;'
|
2015-04-29 18:15:14 +02:00
|
|
|
# Need to set PCRE_HOME to make --with-pcre=/usr work
|
|
|
|
PCRE_HOME=/usr ./configure ${configure_args}
|
|
|
|
}
|
2015-04-28 09:46:11 +02:00
|
|
|
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"
|
|
|
|
}
|
|
|
|
}
|