aboutsummaryrefslogblamecommitdiffstats
path: root/main/amavisd-new/APKBUILD
blob: adbf03169ed781c33ca07ea9cbf95e0c2415aeae (plain) (tree)
1
2
3
4
5
6
7
8
9


                                                
            
        

                                                                              
          
               
                                                         
                                                                  

                                                        
                                                    
              
                                                                   


                                     
         





                                                                        


                        
                                      


                                                                  

                                                                                 


                                                                   


                                                                                                                       
                                                                        
                                                                       
         

 
                                                                    
# Contributor: Leonardo Arena <rnalrd@gmail.com>
# Maintainer: Leonardo Arena <rnalrd@gmail.com>
pkgname=amavisd-new
pkgver=2.6.4
pkgrel=3
pkgdesc="High-performance interface between mailer (MTA) and content checkers"
url="http://www.ijs.si/software/amavisd"
arch="all"
license="GPL-2"
depends="sed file perl perl-archive-zip perl-convert-tnef
perl-convert-uulib perl-mime-tools perl-mail-tools perl-net-server
perl-io-stringy perl-unix-syslog perl-db perl-mail-dkim"
makedepends=""
install="$pkgname.post-install $pkgname.pre-install"
subpackages=""
source="http://www.ijs.si/software/amavisd/$pkgname-$pkgver.tar.gz"

build() {
	cd "$srcdir/$pkgname-$pkgver"
	(
	HOME=/var/amavis
	QUARANTINE=$HOME/quarantine
	USER=amavis
	GROUP=amavis
	DIRS="$HOME $HOME/tmp $HOME/var $HOME/db $HOME/home $QUARANTINE"
	CONFIG=/etc/amavisd.conf

	for dir in $DIRS
	do
		mkdir -p ${pkgdir}$dir
	done

	install -m 755 -o root -D amavisd $pkgdir/usr/sbin/amavisd
	install -m 755 -o root -D amavisd-nanny $pkgdir/usr/bin/amavisd-nanny
	install -m 755 -o root -D amavisd-release $pkgdir/usr/bin/amavisd-release
	sed -e "s:^.*\$MYHOME = .*$:\$MYHOME = '$HOME';:" \
	 -e 's:^.*\$TEMPBASE = .*$:\$TEMPBASE = "\$MYHOME/tmp";:' \
	 -e 's:^.*\$db_home  = .*$:\$db_home = "$MYHOME/db";:' \
	 -e "s:^.*\$QUARANTINEDIR = .*$:\$QUARANTINEDIR = '$QUARANTINE';:" \
	 -e "s:^.*\$daemon_user  = 'vscan';\(.*\)$:\$daemon_user  = 'amavis';\1:" \
	 -e "s:^.*\$daemon_group = 'vscan';\(.*\)$:\$daemon_group  = 'amavis';\1:" < amavisd.conf > amavisd.conf.alpine
	install -m 640 -o root -D amavisd.conf.alpine ${pkgdir}${CONFIG}
	install -m 755 -D ../../amavisd.init $pkgdir/etc/init.d/amavisd
	)
}

md5sums="03d31657f14cd64c1cb38786214234b4  amavisd-new-2.6.4.tar.gz"