2 # See http://wiki.archlinux.org/index.php/VCS_PKGBUILD_Guidelines
3 # for more information on packaging from GIT sources.
5 # Maintainer: Alexander Duscheleit <jinks@huntemann.uni-oldenburg.de>
6 pkgname=dovecot-antispam-git
9 pkgdesc="Integrates DSPAM into dovecot IMAP server."
10 arch=('i686' 'x86_64')
11 url="http://johannes.sipsolutions.net/Projects/dovecot-antispam"
25 _gitroot="http://git.sipsolutions.net/dovecot-antispam.git"
26 _gitname="dovecot-antispam"
30 msg "Connecting to GIT server...."
32 if [ -d $_gitname ] ; then
33 cd $_gitname && git pull origin
34 msg "The local files are updated."
36 git clone $_gitroot $_gitname
39 msg "GIT checkout done or server timeout"
40 msg "Starting make..."
42 rm -rf "$srcdir/$_gitname-build"
43 git clone "$srcdir/$_gitname" "$srcdir/$_gitname-build"
44 cd "$srcdir/$_gitname-build"
46 # copy config file to build-dir
47 cp $srcdir/../defconfig .config
49 # fix up Makefile to create directory inside $pkgdir
50 sed -i -e 's/install -o/install -D -o/' -e 's|$(INSTALLDIR)/|$(INSTALLDIR)/$(LIBRARY_NAME)|' Makefile
54 make DESTDIR="$pkgdir/" install
58 install -D -m 0644 -o root -g root antispam.7.gz "$pkgdir/usr/share/man/man7/dovecot-antispam.7.gz"
60 md5sums=('2b488476d4ac578a0b40b504162f1970')