summaryrefslogtreecommitdiff
path: root/extra/clamav/PKGBUILD
blob: 022cd0e7d928f9989aa76e11c953c78cf18b35e7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
# $Id: PKGBUILD 145066 2011-12-16 09:17:40Z bisson $
# Contributor: Dale Blount <dale@archlinux.org>
# Contributor: Gregor Ibic <gregor.ibic@intelicom.si>
# Maintainer: Gaetan Bisson <bisson@archlinux.org>

pkgname=clamav
pkgver=0.97.3
pkgrel=2
pkgdesc='Anti-virus toolkit for Unix'
url='http://www.clamav.net/'
license=('GPL')
options=('!libtool')
arch=('i686' 'x86_64' 'mips64el')
depends=('bzip2' 'libltdl')
backup=('etc/clamav/clamd.conf' 'etc/clamav/freshclam.conf' 'etc/conf.d/clamav')
source=("http://downloads.sourceforge.net/sourceforge/${pkgname}/${pkgname}-${pkgver}.tar.gz"
        'rc.d'
        'conf.d'
        'logrotate'
        'config.patch')
sha1sums=('263c7b8b7dc1536652ab64e32263d1c60e138655'
          '50cfe02c97e4297a0efd25b23142408380305d30'
          'cb116cdab49a810381a515cbcfb6a6c148547f07'
          'be3310d2b41a68ce06e33c84ab68ffe59fdce104'
          '701a61571788d10ff7af01597785835c6bfea918')

install=install

build() {
	cd "${srcdir}/${pkgname}-${pkgver}"
	patch -p1 -i ../config.patch
	./configure \
		--prefix=/usr \
		--sysconfdir=/etc/clamav \
		--with-dbdir=/var/lib/clamav \
		--disable-clamav \

	make
}

package() {
	cd "${srcdir}/${pkgname}-${pkgver}"
	make DESTDIR="${pkgdir}" install

	# make sure conf files get installed, because make install
	# doesn't do that if clamav is already installed upon building.
	install -D -m644 etc/clamd.conf "${pkgdir}/etc/clamav/clamd.conf"
	install -D -m644 etc/freshclam.conf "${pkgdir}/etc/clamav/freshclam.conf"

	install -D -m644 ../logrotate "${pkgdir}/etc/logrotate.d/clamav"
	install -D -m644 ../conf.d "${pkgdir}/etc/conf.d/clamav"
	install -D -m755 ../rc.d "${pkgdir}/etc/rc.d/clamav"

	# un-distribute databases to require freshclam
	rm "${pkgdir}"/var/lib/clamav/*.cvd
}