wok view daloradius/receipt @ rev 20645

updated hostapd (2.6 -> 2.7)
author Hans-G?nter Theisgen
date Fri Jan 11 16:39:21 2019 +0100 (12 months ago)
parents 9e01bc6321ea
children
line source
1 # SliTaz package receipt.
3 PACKAGE="daloradius"
4 VERSION="0.9-9"
5 CATEGORY="network"
6 SHORT_DESC="A RADIUS web platform for managing Hotspots."
7 MAINTAINER="pascal.bellard@slitaz.org"
8 LICENSE="GPL2"
9 TARBALL="$PACKAGE-$VERSION.tar.gz"
10 WEB_SITE="http://www.daloradius.com/"
11 WGET_URL="$SF_MIRROR/$PACKAGE/$TARBALL"
13 DEPENDS="php-gd php-mysql freeradius"
15 # Rules to gen a SliTaz package suitable for Tazpkg.
16 genpkg_rules()
17 {
18 mkdir -p $fs/usr/share/daloradius $fs/etc/mysql.d
19 cp -a $src/* $fs/usr/share/daloradius
20 mv $fs/usr/share/daloradius/library/daloradius.conf.php $fs/etc/
21 ln -s /etc/daloradius.conf.php $fs/usr/share/daloradius/library/daloradius.conf.php
22 cat > $fs/etc/mysql.d/daloradius <<EOT
23 #!/bin/sh
25 mysqldump readius > /dev/null 2>&1 | grep -qi daloradius ||
26 mysql -u root radius < /usr/share/daloradius/contrib/db/mysql-daloradius.sql
27 chmod -x /etc/mysql.d/daloradius
28 EOT
29 chmod 755 $fs/etc/mysql.d/daloradius
30 }
32 post_install()
33 {
34 # Configure lighttpd server
35 if [ -f "$1/etc/lighttpd/lighttpd.conf" ]; then
36 if ! grep -q /usr/share/daloradius/ "$1/etc/lighttpd/lighttpd.conf"; then
37 sed -e 's|.*"/examples/" => "/usr/share/examples/",| "/examples/" => "/usr/share/examples/",\n "/daloradius/" => "/usr/share/daloradius/",|g' -i "$1/etc/lighttpd/lighttpd.conf"
38 if [ -z "$1" ]; then
39 # Start Web server.
40 /etc/init.d/lighttpd stop
41 /etc/init.d/lighttpd start
42 fi
43 fi
44 fi
45 # Configure apache server
46 if [ -f "$1/etc/apache/httpd.conf" ]; then
47 if [ ! -f "$1/etc/apache/conf.d/daloradius" ]; then
48 cat > "$1/etc/apache/conf.d/daloradius" <<EOT
49 <IfModule mod_alias.c>
50 Alias /daloradius /usr/share/daloradius
51 </IfModule>
52 <Directory /usr/share/daloradius/>
53 DirectoryIndex index.php
54 Options +FollowSymLinks
55 AllowOverride None
56 Order allow,deny
57 Allow from all
58 </Directory>
59 EOT
60 if [ -z "$1" ]; then
61 # Start Web server.
62 /etc/init.d/apache stop
63 /etc/init.d/apache start
64 fi
65 fi
66 fi
67 }