639688ad79
Building the shipped llvm with gcc6 fails. On the other hand clamav does not want to work with our system llvm because it's too new (needs < 3.7).
66 lines
2.3 KiB
Bash
66 lines
2.3 KiB
Bash
# Template file for 'clamav'
|
|
pkgname=clamav
|
|
version=0.99.2
|
|
revision=4
|
|
build_style=gnu-configure
|
|
# XXX: system llvm is too new (< 3.7 required)
|
|
# Shipped llvm does not build with gcc6
|
|
configure_args="--sbindir=/usr/bin --libdir=/usr/lib --with-pcre=/usr --disable-llvm"
|
|
conf_files="/etc/clamd.conf /etc/freshclam.conf"
|
|
system_accounts="clamav"
|
|
clamav_homedir="/var/lib/${pkgname}"
|
|
clamav_descr="ClamAV user"
|
|
hostmakedepends="bison flex pkg-config zip"
|
|
makedepends="libressl-devel libxml2-devel libcurl-devel ncurses-devel
|
|
json-c-devel pcre-devel tcl-devel bzip2-devel zlib-devel"
|
|
short_desc="Clam Anti-Virus scanner"
|
|
maintainer="Jürgen Buchmüller <pullmoll@t-online.de>"
|
|
license="GPL-2"
|
|
homepage="http://www.clamav.net/"
|
|
distfiles="http://www.clamav.net/downloads/production/${pkgname}-${version}.tar.gz"
|
|
checksum=167bd6a13e05ece326b968fdb539b05c2ffcfef6018a274a10aeda85c2c0027a
|
|
|
|
CPPFLAGS="-Wno-unused-local-typedefs"
|
|
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
|
|
case "$XBPS_TARGET_MACHINE" in
|
|
*-musl) makedepends+=" musl-fts-devel"
|
|
LDFLAGS="-lfts"
|
|
;;
|
|
esac
|
|
|
|
do_configure() {
|
|
# Disable detection of sys/cdefs.h (it's obsolete)
|
|
sed -i configure -e 's; sys/cdefs\.h$;;'
|
|
sed -i configure -e 's;3\.7;3.9;'
|
|
# Need to set PCRE_HOME to make --with-pcre=/usr work
|
|
PCRE_HOME=/usr ./configure ${configure_args}
|
|
}
|
|
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"
|
|
}
|
|
}
|