aboutsummaryrefslogtreecommitdiffstats
path: root/main/coova-chilli/APKBUILD
blob: 428d9db7754506d3e41582ca1a081cd2b90b1770 (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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
# Contributor: grharry
# Maintainer: Leonardo Arena <rnalrd@alpinelinux.org>
pkgname=coova-chilli
pkgver=1.3.0
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"
pkgusers="chilli"
pkggroups="chilli"
subpackages="$pkgname-doc $pkgname-dev"
source="http://ap.coova.org/chilli/coova-chilli-$pkgver.tar.gz
	automake.patch
	100-fix-sysinfo-redeclaration.patch
	"

_builddir="$srcdir/$pkgname-$pkgver"

prepare() {
	cd $_builddir
	update_config_sub || return 1
	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 \
		--build=$CBUILD \
		--host=$CHOST \
		--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 \
		|| return 1

	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
e1d1a4c5573330e40a651cd2d7c027e7  100-fix-sysinfo-redeclaration.patch"
sha256sums="ca24ac274340c65a8e7ff704e6866a04380a87c444f261ba84097f0bd1c162e8  coova-chilli-1.3.0.tar.gz
16f529c7deee24155bd900a3f64fc110207d435ad12bd91e71823acd6156ab25  automake.patch
8da92965f81761c6e90b6dacd0cc1003caa013b8967b81f297baefc708dd58a9  100-fix-sysinfo-redeclaration.patch"
sha512sums="40dd77a6fb2877f46b0d6e84cfba9507dfac0999f6aff45d3a28bb64fd044b707cfeacd06d4bd411669e3a47cdc5ec14dbf79effee235174fbbf0b88c30015b3  coova-chilli-1.3.0.tar.gz
643b99f473753881f15e8b049ae1e071a8fe6164fd92b30a54ad27a0a8b58d26727ab82d28b587defc1f28f4213c64d298bf707b9bf6a3a98013578b26a79733  automake.patch
a87d179fd08f2e96aee327c131503e646697e6d75f8e75ff6a901d60ef4f958e495816b5ed7ee1946ba3d9bb5047bdc955c71943068c47c63fcf415d4a2b1df9  100-fix-sysinfo-redeclaration.patch"