updated on Fri Jan 13 04:01:25 UTC 2012
[aur-mirror.git] / ironbee-git / PKGBUILD
blobf51e3ebde41a1da30f022a0c248065c2ff304b46
1 # Contributor: Michael Asher <michael at wesolveeverything [dot] com>
2 # Maintainer: Michael Asher <michael at wesolveeverything [dot] com>
4 pkgname=ironbee-git
5 pkgdesc="Open-Source Web Application Firewall"
6 url="https://www.ironbee.com"
7 pkgver=20111007
8 pkgrel=2
9 arch=('any')
10 license=('APACHE')
11 options=('makeflags' '!ccache' '!libtool')
12 depends=('apache' 'libhtp-git' )
13 source=('mod_ironbee.conf')
14 md5sums=('6aec65343e39f016753ba2be7b6027c1')
15 install=(${pkgname}.install)
17 _gitroot="http://github.com/ironbee/ironbee.git"
18 _gitname="ironbee"
20 build() {
21   cd "${srcdir}"
22   msg "Pulling source from ${_gitroot}"
24   if [ -d $_gitname ] ; then
25     msg2 "Local Repo Exists. Updating local files"
26     cd $_gitname && git pull origin >> /dev/null 2>&1
27   else
28     git clone $_gitroot $_gitname >> /dev/null 2>&1
29   fi
31   rm -rf "$srcdir/$_gitname-build"
32   git clone "$srcdir/$_gitname" "$srcdir/$_gitname-build" >> /dev/null 2>&1
33   cd "$srcdir/$_gitname-build"
34   msg2 "Fetching additional modules"
35   git submodule init >> /dev/null 2>&1 
36   git submodule update >> /dev/null 2>&1
37   msg "Generating \'configure\' files"
38   ./autogen.sh >> /dev/null 2>&1
39   msg "Running configure scripts"
40   ./configure --prefix=/usr >> /dev/null 2>&1
41   #
42   # For some reason running a 'make' here fails unless I compile the luajit release first.
43   #
44   msg "Compiling sources"
45   cd libs
46   cd luajit-2.0-ironbee 
47   make amalg >> /dev/null 2>&1
48   cd .. 
49   cd ..
50   make >> /dev/null 2>&1 
51   make check  >> /dev/null 2>&1
52   msg "Generating Documentation"
53   make manual >> /dev/null 2>&1
54   make doxygen >> /dev/null 2>&1
55   make DESTDIR=${pkgdir} install >> /dev/null 2>&1
56   msg "Installing to \$pkgdir"
57   install -Dm644 LICENSE ${pkgdir}/usr/share/licenses/${pkgname}/LICENSE
58   mkdir -p ${pkgdir}/usr/share/doc/${pkgname}
59   cp -r docs/docbook/manual/output/* ${pkgdir}/usr/share/doc/${pkgname}/
60   cd ${srcdir}
61   install -Dm644 mod_ironbee.conf ${pkgdir}/etc/httpd/conf/extra/mod_ironbee.conf
62
63 # vim: ts=2 sw=2 et: