summaryrefslogtreecommitdiffstats
path: root/amavisd-new/PKGBUILD
blob: 88f8c3da7b08bb04b67438c96f89e4f6666f72ae (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
# Contributor: Piotr Beling <qwak@stud.ics.p.lodz.pl>
# Based on amavisd-new by:
# Contributor: Wael Nasreddine <wael@phoenixlinux.org>
# Maintainer: Guillermo A. Amaral <me@guillermoamaral.com> (thewonka)

pkgname='amavisd-new'
pkgver='2.6.4'
pkgrel=2
pkgdesc='A high-performance interface between mailer (MTA) and content checkers. Written in Perl for maintainability.'
url='http://www.ijs.si/software/amavisd/'
arch=('any')
privides=('amavisdnew')
conflicts=('amavisdnew')
replaces=('amavisdnew')
backup=('etc/amavisd/amavisd.conf')
depends=('perl' 'perl-mime-tools' 'perl-archive-tar' 'perl-archive-zip' 'perl-compress-zlib'  'perl-net-server' 'perl-io-stringy' 'perl-berkeleydb' 'perl-unix-syslog' 'perl-convert-tnef' 'perl-convert-uulib' 'perl-crypt-openssl-rsa')
#'perl-mail-dkim>0.31'	#enable it when possible
source=("http://www.ijs.si/software/amavisd/amavisd-new-${pkgver}.tar.gz" 'amavisd')
install=${pkgname}.install
license=('GPL')

build()
{
	cd ${startdir}/src/amavisd-new-${pkgver}

	sed -i \
	    -e "s/\\\$daemon_user  = 'vscan'/\\\$daemon_user  = 'amavis'/g" \
	    -e "s/\\\$daemon_group = 'vscan'/\\\$daemon_group = 'amavis'/g" \
	    -e "sX# \\\$MYHOME = '/var/amavis'X\\\$MYHOME = '/home/amavis'Xg" \
    	    -e "sX\\\$QUARANTINEDIR = '/var/virusmails'X\\\$QUARANTINEDIR = '/home/amavis/quarantine'Xg" \
	    amavisd.conf

	#must disable dkim ver. now becouse perl dkim package in comunity is old
	sed -i \
	    -e "s/\\\$enable_dkim_verification = 1/\\\$enable_dkim_verification = 0/g" \
	    -e "s/\\\$enable_dkim_signing = 1/\\\$enable_dkim_signing = 0/g" \
	    amavisd.conf

	install -D -m755 amavisd ${startdir}/pkg/usr/sbin/amavisd || return 1
	install -D -m644 amavisd.conf ${startdir}/pkg/etc/amavisd/amavisd.conf || return 1
	install -D -m644 amavisd.conf-default ${startdir}/pkg/etc/amavisd/amavisd.conf-default || return 1
	install -D -m644 amavisd.conf-sample ${startdir}/pkg/etc/amavisd/amavisd.conf-sample || return 1
	install -D -m755 ${startdir}/src/amavisd ${startdir}/pkg/etc/rc.d/amavisd || return 1
}

md5sums=('03d31657f14cd64c1cb38786214234b4'
         '160b24ef7742babe70832ecdc44fcd52')