wok-6.x view phpmyadmin/receipt @ rev 12943

imagemagick: update bdeps
author Pascal Bellard <pascal.bellard@slitaz.org>
date Wed May 30 17:52:09 2012 +0200 (2012-05-30)
parents cb0d692a7f54
children a283e7450161
line source
1 # SliTaz package receipt.
3 PACKAGE="phpmyadmin"
4 VERSION="3.4.10.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.phpmyadmin.net/"
11 WGET_URL="$SF_MIRROR/$PACKAGE/$TARBALL"
12 SUGGESTED="php-mcrypt"
13 DEPENDS="php-mysqli"
14 CONFIG_FILES="/etc/phpmyadmin/config.inc.php"
16 # Rules to gen a SliTaz package suitable for Tazpkg.
17 genpkg_rules()
18 {
19 mkdir -p $fs/usr/share/phpmyadmin $fs/etc/phpmyadmin $fs/usr/share/applications
20 cp -a $src/. $fs/usr/share/phpmyadmin
21 ln -s /etc/phpmyadmin/config.inc.php $fs/usr/share/phpmyadmin/config.inc.php
22 cp $src/config.sample.inc.php $fs/etc/phpmyadmin/config.inc.php
23 rm -f $fs/usr/share/phpmyadmin/phpMyAdmin-$VERSION-all-languages
24 cp $stuff/phpmyadmin.desktop $fs/usr/share/applications
25 chown -R www.www $fs/usr/share/phpmyadmin $fs/etc/phpmyadmin
26 chmod 700 $fs/etc/phpmyadmin
27 chmod 644 $fs/etc/phpmyadmin/config.inc.php
29 sed -i s'/\?>//' $fs/etc/phpmyadmin/config.inc.php
31 cat <<"EOT">> $fs/etc/phpmyadmin/config.inc.php
33 $cfg['McryptDisableWarning'] = true;
34 // For public use you may comment the following lines
35 // to enforce the security.
36 $cfg['Servers'][$i]['AllowNoPassword'] = true;
37 $cfg['Servers'][$i]['AllowNoPasswordRoot'] = true;
38 $cfg['Servers'][$i]['AllowRoot'] = true;
39 ?>
40 EOT
41 }
43 post_install()
44 {
45 # Configure lighttpd server
46 if [ -f $1/etc/lighttpd/lighttpd.conf ]; then
47 if ! grep -q /usr/share/phpmyadmin/ $1/etc/lighttpd/lighttpd.conf; then
48 sed -e 's|.*"/examples/" => "/usr/share/examples/",| "/examples/" => "/usr/share/examples/",\n "/phpmyadmin/" => "/usr/share/phpmyadmin/",|g' -i $1/etc/lighttpd/lighttpd.conf
49 if [ -z "$1" ]; then
50 # Start Web server.
51 /etc/init.d/lighttpd stop
52 /etc/init.d/lighttpd start
53 fi
54 fi
55 fi
56 # Configure apache server
57 if [ -f $1/etc/apache/httpd.conf ]; then
58 if [ ! -f $1/etc/apache/conf.d/phpmyadmin ]; then
59 cat > $1/etc/apache/conf.d/phpmyadmin <<EOT
60 <IfModule mod_alias.c>
61 Alias /phpmyadmin /usr/share/phpmyadmin
62 </IfModule>
63 <DirectoryMatch /usr/share/phpmyadmin/>
64 DirectoryIndex index.php
65 Options +FollowSymLinks
66 AllowOverride None
67 Order allow,deny
68 Allow from all
69 </DirectoryMatch>
70 EOT
71 if [ -z "$1" ]; then
72 # Start Web server.
73 /etc/init.d/apache stop
74 /etc/init.d/apache start
75 fi
76 fi
77 fi
78 }