wok-6.x diff daloradius/receipt @ rev 24500
Add some current_version
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Sat Feb 19 19:01:32 2022 +0000 (2022-02-19) |
parents | 640a2eba2511 |
children | 8f37db468deb |
line diff
1.1 --- a/daloradius/receipt Mon Feb 07 11:38:23 2022 +0000 1.2 +++ b/daloradius/receipt Sat Feb 19 19:01:32 2022 +0000 1.3 @@ -1,13 +1,14 @@ 1.4 # SliTaz package receipt. 1.5 1.6 PACKAGE="daloradius" 1.7 -VERSION="0.9-9" 1.8 +VERSION="1.1-2" 1.9 CATEGORY="network" 1.10 SHORT_DESC="A RADIUS web platform for managing Hotspots." 1.11 MAINTAINER="pascal.bellard@slitaz.org" 1.12 LICENSE="GPL2" 1.13 -TARBALL="$PACKAGE-$VERSION.tar.gz" 1.14 WEB_SITE="http://www.daloradius.com/" 1.15 + 1.16 +TARBALL="$PACKAGE-$VERSION.zip" 1.17 WGET_URL="$SF_MIRROR/$PACKAGE/$TARBALL" 1.18 1.19 DEPENDS="php-gd php-mysql freeradius" 1.20 @@ -22,10 +23,13 @@ 1.21 # Rules to gen a SliTaz package suitable for Tazpkg. 1.22 genpkg_rules() 1.23 { 1.24 - mkdir -p $fs/usr/share/daloradius $fs/etc/mysql.d 1.25 - cp -a $src/* $fs/usr/share/daloradius 1.26 - mv $fs/usr/share/daloradius/library/daloradius.conf.php $fs/etc/ 1.27 - ln -s /etc/daloradius.conf.php $fs/usr/share/daloradius/library/daloradius.conf.php 1.28 + mkdir -p $fs/usr/share/daloradius 1.29 + mkdir -p $fs/etc/mysql.d 1.30 + 1.31 + cp -a $src/* $fs/usr/share/daloradius 1.32 + mv $fs/usr/share/daloradius/daloradius/library/daloradius.conf.php \ 1.33 + $fs/etc/ 1.34 + ln -s /etc/daloradius.conf.php $fs/usr/share/daloradius/daloradius/library/daloradius.conf.php 1.35 cat > $fs/etc/mysql.d/daloradius <<EOT 1.36 #!/bin/sh 1.37 1.38 @@ -39,10 +43,13 @@ 1.39 post_install() 1.40 { 1.41 # Configure lighttpd server 1.42 - if [ -f "$1/etc/lighttpd/lighttpd.conf" ]; then 1.43 - if ! grep -q /usr/share/daloradius/ "$1/etc/lighttpd/lighttpd.conf"; then 1.44 + if [ -f "$1/etc/lighttpd/lighttpd.conf" ] 1.45 + then 1.46 + if ! grep -q /usr/share/daloradius/ "$1/etc/lighttpd/lighttpd.conf" 1.47 + then 1.48 sed -e 's|.*"/examples/" => "/usr/share/examples/",| "/examples/" => "/usr/share/examples/",\n "/daloradius/" => "/usr/share/daloradius/",|g' -i "$1/etc/lighttpd/lighttpd.conf" 1.49 - if [ -z "$1" ]; then 1.50 + if [ -z "$1" ] 1.51 + then 1.52 # Start Web server. 1.53 /etc/init.d/lighttpd stop 1.54 /etc/init.d/lighttpd start 1.55 @@ -50,8 +57,10 @@ 1.56 fi 1.57 fi 1.58 # Configure apache server 1.59 - if [ -f "$1/etc/apache/httpd.conf" ]; then 1.60 - if [ ! -f "$1/etc/apache/conf.d/daloradius" ]; then 1.61 + if [ -f "$1/etc/apache/httpd.conf" ] 1.62 + then 1.63 + if [ ! -f "$1/etc/apache/conf.d/daloradius" ] 1.64 + then 1.65 cat > "$1/etc/apache/conf.d/daloradius" <<EOT 1.66 <IfModule mod_alias.c> 1.67 Alias /daloradius /usr/share/daloradius 1.68 @@ -64,7 +73,8 @@ 1.69 Allow from all 1.70 </Directory> 1.71 EOT 1.72 - if [ -z "$1" ]; then 1.73 + if [ -z "$1" ] 1.74 + then 1.75 # Start Web server. 1.76 /etc/init.d/apache stop 1.77 /etc/init.d/apache start