desktop/clamav/PKGBUILD
2014-05-14 15:47:50 +00:00

61 lines
1.8 KiB
Bash

# contributor (x86_64): Giuseppe Calà <jiveaxe@gmail.com>
pkgname=clamav
pkgver=0.98.3
pkgrel=1
pkgdesc='Anti-virus toolkit for Unix'
arch=('x86_64')
options=('!libtool')
install="$pkgname.install"
license=('GPL')
categories=('system')
backup=('etc/conf.d/clamav' 'etc/logrotate.d/clamav')
url='http://www.clamav.net/'
depends=('bzip2' 'zlib' 'libtool')
source=("http://downloads.sourceforge.net/sourceforge/${pkgname}/${pkgname}-${pkgver}.tar.gz"
'clamav.confd'
'clamav.logrotate'
'config.patch'
'service'
'service.fresh'
'tmpfiles.d')
sha1sums=('32f0a0675f8023b20e1d19fe8592e330674d0551'
'cb116cdab49a810381a515cbcfb6a6c148547f07'
'be3310d2b41a68ce06e33c84ab68ffe59fdce104'
'00dfadd93d11186793cb1161745f9dd7370beb99'
'df522b0488f3901e491f148c9300f6bae348c605'
'cda9a087e5593992150cb456e34c5f6f589aca82'
'a224ea9b4d0f4f196827347d54bed51e11c197ea')
prepare() {
cd ${pkgname}-${pkgver}
patch -p1 -i ../config.patch
}
build() {
cd ${pkgname}-${pkgver}
./configure --prefix=/usr \
--sysconfdir=/etc/clamav \
--with-dbdir=/var/lib/clamav \
--disable-clamav
make
}
package() {
cd ${pkgname}-${pkgver}
make DESTDIR="${pkgdir}" install
install -D -m644 ../service.fresh "${pkgdir}/usr/lib/systemd/system/freshclamd.service"
install -D -m644 ../service "${pkgdir}/usr/lib/systemd/system/clamd.service"
install -D -m644 ../tmpfiles.d "${pkgdir}/usr/lib/tmpfiles.d/clamav.conf"
install -D -m644 ../clamav.logrotate "$pkgdir/etc/logrotate.d/clamav"
install -D -m644 ../clamav.confd "$pkgdir/etc/conf.d/clamav"
install -d -o 64 -g 64 "${pkgdir}"/run/clamav
install -d -o 64 -g 64 "${pkgdir}"/var/log/clamav
install -d -o 64 -g 64 "${pkgdir}"/var/lib/clamav
# un-distribute databases to require freshclam
#rm "$pkgdir"/var/lib/clamav/*.cvd
}