# Contributor: grharry # Maintainer: Leonardo Arena pkgname=coova-chilli pkgver=1.2.9 pkgrel=2 pkgdesc="CoovaChilli is an open source access controller for wireless LAN" url="http://www.coova.org/" arch="all" license="GPL" depends= makedepends="perl openssl-dev autoconf automake libtool curl-dev" install="$pkgname.pre-install $pkgname.post-install" subpackages="$pkgname-doc $pkgname-dev" source="http://ap.coova.org/chilli/coova-chilli-$pkgver.tar.gz automake.patch" _builddir="$srcdir/$pkgname-$pkgver" prepare() { cd $_builddir for i in $source; do case $i in *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;; esac done sed -i 's/-Werror//g' src/Makefile.am || return 1 sed -i 's%(localstatedir)/run%(localstatedir)%' src/Makefile.am || return 1 libtoolize --force \ && aclocal && autoconf && automake || return 1 } build() { cd $_builddir ./configure --prefix=/usr \ --sysconfdir=/etc \ --mandir=/usr/share/man \ --infodir=/usr/share/info \ --localstatedir=/var/run/chilli \ --libdir=/usr/lib \ --sysconfdir=/etc \ --with-openssl \ --with-poll \ --enable-binstatusfile \ --enable-statusfile \ --enable-chillixml \ --enable-ipwhitelist \ --enable-redirinject \ --enable-redirdnsreq \ --enable-redirinject \ --enable-debug \ --enable-debug2 \ --enable-sessgarden \ --enable-shared \ --enable-chilliredir \ --enable-chilliscript \ --enable-layer3 \ --enable-dhcpopt \ --enable-curl \ --enable-largelimits export CFLAGS="$CFLAGS -Wno-error=unused-but-set-variable" make -j1 || return 1 } package() { cd $_builddir make DESTDIR="$pkgdir" install || return 1 rm "$pkgdir"/usr/lib/*.la || return 1 install -D -m755 ../../chilli.initd $pkgdir/etc/init.d/chilli install -D -m755 ../../chilli.confd $pkgdir/etc/conf.d/chilli mkdir -p $pkgdir/var/run/chilli } md5sums="a493d0562fc3b05fe86d8ad65f7f2dc0 coova-chilli-1.2.9.tar.gz b3aaf43bcdb5cfbf39d1c730d1de1a3b automake.patch"