wok-stable view phpmyadmin/receipt @ rev 1996

Up: leafpad (0.8.16)
author Christophe Lincoln <pankso@slitaz.org>
date Thu Jan 08 19:16:56 2009 +0100 (2009-01-08)
parents 32fa0b9984a6
children 942b862caa4b
line source
1 # SliTaz package receipt.
3 PACKAGE="phpmyadmin"
4 VERSION="2.11.7.1"
5 CATEGORY="misc"
6 SHORT_DESC="Administration of MySQL over the Web."
7 MAINTAINER="pascal.bellard@slitaz.org"
8 PHPMYADM="phpMyAdmin-$VERSION-all-languages"
9 TARBALL="$PHPMYADM.tar.bz2"
10 WEB_SITE="http://www.$PACKAGE.net/"
11 WGET_URL="$SF_MIRROR/$PACKAGE/$TARBALL"
12 DEPENDS="php-mysql"
13 CONFIG_FILES="/etc/phpmyadmin/config.inc.php"
15 # Rules to configure and make the package.
16 compile_rules()
17 {
18 [ -L $src ] || ln -s $PHPMYADM $src
19 }
21 # Rules to gen a SliTaz package suitable for Tazpkg.
22 genpkg_rules()
23 {
24 mkdir -p $fs/usr/share/phpmyadmin $fs/etc/phpmyadmin $fs/usr/share/applications
25 cp -a $src/. $fs/usr/share/phpmyadmin
26 ln -s /etc/phpmyadmin $fs/usr/share/phpmyadmin/config
27 cp $src/config.sample.inc.php $fs/etc/phpmyadmin/config.inc.php
28 rm -f $fs/usr/share/phpmyadmin/phpMyAdmin-$VERSION-all-languages
29 cp stuff/phpmyadmin.desktop $fs/usr/share/applications
30 chown -R www.www $fs/usr/share/phpmyadmin $fs/etc/phpmyadmin
31 chmod 700 $fs/etc/phpmyadmin
32 chmod 600 $fs/etc/phpmyadmin/config.inc.php
33 }
35 post_install()
36 {
37 # Configure lighttpd server
38 if [ -f $1/etc/lighttpd/lighttpd.conf ]; then
39 if ! grep -q /usr/share/phpmyadmin/ $1/etc/lighttpd/lighttpd.conf; then
40 sed -e 's|.*"/examples/" => "/usr/share/examples/",| "/examples/" => "/usr/share/examples/",\n "/phpmyadmin/" => "/usr/share/phpmyadmin/",|g' -i $1/etc/lighttpd/lighttpd.conf
41 if [ -z "$1" ]; then
42 # Start Web server.
43 /etc/init.d/lighttpd stop
44 /etc/init.d/lighttpd start
45 fi
46 fi
47 fi
48 # Configure apache server
49 if [ -f $1/etc/apache/httpd.conf ]; then
50 if [ ! -f $1/etc/apache/conf.d/phpmyadmin ]; then
51 cat > $1/etc/apache/conf.d/phpmyadmin <<EOT
52 <IfModule mod_alias.c>
53 Alias /phpmyadmin /usr/share/phpmyadmin
54 </IfModule>
55 <DirectoryMatch /usr/share/phpmyadmin/>
56 DirectoryIndex index.php
57 Options +FollowSymLinks
58 AllowOverride None
59 Order allow,deny
60 Allow from all
61 </DirectoryMatch>
62 EOT
63 if [ -z "$1" ]; then
64 # Start Web server.
65 /etc/init.d/apache stop
66 /etc/init.d/apache start
67 fi
68 fi
69 fi
70 }