wok-current view freeradius-dialupadmin/receipt @ rev 1351

add recordmydesktop
author Allan Pinto <allan316@gmail.com>
date Sat Sep 06 15:35:46 2008 +0000 (2008-09-06)
parents
children 79d7b34e8525
line source
1 # SliTaz package receipt.
3 PACKAGE="freeradius-dialupadmin"
4 VERSION="2.0.5"
5 CATEGORY="network"
6 SHORT_DESC="radius server web interface"
7 MAINTAINER="Serge Daigle sdaigl@lacitec.on.ca"
8 DEPENDS="php"
9 WEB_SITE="http://www.freeradius.org/"
10 WANTED="freeradius"
11 CONFIG_FILES="/etc/dialupadmin"
13 # Rules to gen a SliTaz package suitable for Tazpkg.
14 genpkg_rules()
15 {
16 src=$(cd ../freeradius/freeradius-server-$VERSION; pwd)
17 mkdir -p $fs/usr/share $fs/etc/dialupadmin
18 cp -a $src/dialup_admin $fs/usr/share
19 cp -a $src/dialup_admin/conf/* $fs/etc/dialupadmin
20 rm -rf $fs/usr/share/dialup_admin/conf
21 ln -s /etc/dialupadmin $fs/usr/share/dialup_admin
22 }
24 post_install()
25 {
26 ( cd $1/ ; cpio -o -H newc | gzip -9 ) > \
27 $1/$INSTALLED/$PACKAGE/volatile.cpio.gz <<EOT
28 etc/dialupadmin
29 EOT
30 # Configure lighttpd server
31 if [ -f $1/etc/lighttpd/lighttpd.conf ]; then
32 if ! grep -q /usr/share/dialup_admin/ $1/etc/lighttpd/lighttpd.conf; then
33 sed -e 's|.*"/examples/" => "/usr/share/examples/",| "/examples/" => "/usr/share/examples/",\n "/dialupadmin/" => "/usr/share/dialup_admin/htdocs/",|g' -i $1/etc/lighttpd/lighttpd.conf
34 if [ -z "$1" ]; then
35 # Start Web server.
36 /etc/init.d/lighttpd stop
37 /etc/init.d/lighttpd start
38 fi
39 fi
40 fi
41 # Configure apache server
42 if [ -f $1/etc/apache/httpd.conf ]; then
43 if [ ! -f $1/etc/apache/conf.d/phpldapadmin ]; then
44 cat > $1/etc/apache/conf.d/phpldapadmin <<EOT
45 <IfModule mod_alias.c>
46 Alias /dialupadmin /usr/share/dialup_admin/htdocs
47 </IfModule>
48 <DirectoryMatch /usr/share/dialup_admin/htdocs/>
49 DirectoryIndex index.php
50 Options +FollowSymLinks
51 AllowOverride None
52 Order allow,deny
53 Allow from all
54 </DirectoryMatch>
55 EOT
56 if [ -z "$1" ]; then
57 # Start Web server.
58 /etc/init.d/apache stop
59 /etc/init.d/apache start
60 fi
61 fi
62 fi
63 }
65 repack_cleanup()
66 {
67 zcat $INSTALLED/$PACKAGE/volatile.cpio.gz | ( cd $1 ; cpio -id )
68 }