updated on Wed Jan 11 00:07:16 UTC 2012
[aur-mirror.git] / dovecot-antispam-git / PKGBUILD
blobdf5c39ad68cd22b0ef960ddcbf742debc4d7133f
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
7 pkgver=20100309
8 pkgrel=1
9 pkgdesc="Integrates DSPAM into dovecot IMAP server."
10 arch=('i686' 'x86_64')
11 url="http://johannes.sipsolutions.net/Projects/dovecot-antispam"
12 license=('GPL')
13 groups=()
14 depends=('dovecot')
15 makedepends=('git')
16 provides=()
17 conflicts=()
18 replaces=()
19 backup=()
20 options=()
21 install=
22 source=(defconfig)
23 noextract=()
25 _gitroot="http://git.sipsolutions.net/dovecot-antispam.git"
26 _gitname="dovecot-antispam"
28 build() {
29   cd "$srcdir"
30   msg "Connecting to GIT server...."
32   if [ -d $_gitname ] ; then
33     cd $_gitname && git pull origin
34     msg "The local files are updated."
35   else
36     git clone $_gitroot $_gitname
37   fi
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
52   # BUILD
53   make || return 1
54   make DESTDIR="$pkgdir/" install
55   
56   # install manpage
57   gzip antispam.7
58   install -D -m 0644 -o root -g root antispam.7.gz "$pkgdir/usr/share/man/man7/dovecot-antispam.7.gz"
60 md5sums=('2b488476d4ac578a0b40b504162f1970')