aboutsummaryrefslogtreecommitdiffstats
path: root/main/coova-chilli/APKBUILD
blob: 3d33e22c81af760b5297d1c46130378b269da015 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
# Contributor: grharry
# Maintainer: Leonardo Arena <rnalrd@alpinelinux.org>
pkgname=coova-chilli
pkgver=1.3.0
pkgrel=0
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"
pkgusers="chilli"
pkggroups="chilli"
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 --add-missing || 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
	chown -R chilli:chilli $pkgdir/var/run/chilli
}

md5sums="dc0037e3cdebcb60508081b4e42e984a  coova-chilli-1.3.0.tar.gz
b3aaf43bcdb5cfbf39d1c730d1de1a3b  automake.patch"