wok annotate daloradius/receipt @ rev 24142

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