wok view phpmyadmin/receipt @ rev 15198

php*: add license
author Pascal Bellard <pascal.bellard@slitaz.org>
date Sat Sep 07 15:59:12 2013 +0000 (2013-09-07)
parents 1a44c7c68079
children 1019443a6c35
line source
1 # SliTaz package receipt.
3 PACKAGE="phpmyadmin"
4 VERSION="3.5.2"
5 CATEGORY="misc"
6 SHORT_DESC="Administration of MySQL over the Web."
7 MAINTAINER="pascal.bellard@slitaz.org"
8 LICENSE="GPL2"
9 PHPMYADM="phpMyAdmin-$VERSION-all-languages"
10 TARBALL="$PHPMYADM.tar.bz2"
11 WEB_SITE="http://www.phpmyadmin.net/"
12 WGET_URL="$SF_MIRROR/$PACKAGE/$TARBALL"
13 SUGGESTED="php-mcrypt"
14 CONFIG_FILES="/etc/phpmyadmin/config.inc.php"
16 DEPENDS="php-mysqli"
18 # Rules to gen a SliTaz package suitable for Tazpkg.
19 genpkg_rules()
20 {
21 mkdir -p $fs/usr/share/phpmyadmin $fs/etc/phpmyadmin $fs/usr/share/applications
22 cp -a $src/. $fs/usr/share/phpmyadmin
23 ln -s /etc/phpmyadmin/config.inc.php $fs/usr/share/phpmyadmin/config.inc.php
24 cp $src/config.sample.inc.php $fs/etc/phpmyadmin/config.inc.php
25 rm -f $fs/usr/share/phpmyadmin/phpMyAdmin-$VERSION-all-languages
26 cp $stuff/phpmyadmin.desktop $fs/usr/share/applications
27 chown -R www.www $fs/usr/share/phpmyadmin $fs/etc/phpmyadmin
28 chmod 700 $fs/etc/phpmyadmin
29 chmod 644 $fs/etc/phpmyadmin/config.inc.php
31 sed -i s'/\?>//' $fs/etc/phpmyadmin/config.inc.php
33 cat <<"EOT">> $fs/etc/phpmyadmin/config.inc.php
35 $cfg['McryptDisableWarning'] = true;
36 // For public use you may comment the following lines
37 // to enforce the security.
38 $cfg['Servers'][$i]['AllowNoPassword'] = true;
39 $cfg['Servers'][$i]['AllowNoPasswordRoot'] = true;
40 $cfg['Servers'][$i]['AllowRoot'] = true;
41 ?>
42 EOT
43 }
45 post_install()
46 {
47 # Configure lighttpd server
48 if [ -f $1/etc/lighttpd/lighttpd.conf ]; then
49 if ! grep -q /usr/share/phpmyadmin/ $1/etc/lighttpd/lighttpd.conf; then
50 sed -e 's|.*"/examples/" => "/usr/share/examples/",| "/examples/" => "/usr/share/examples/",\n "/phpmyadmin/" => "/usr/share/phpmyadmin/",|g' -i $1/etc/lighttpd/lighttpd.conf
51 if [ -z "$1" ]; then
52 # Start Web server.
53 /etc/init.d/lighttpd stop
54 /etc/init.d/lighttpd start
55 fi
56 fi
57 fi
58 # Configure apache server
59 if [ -f $1/etc/apache/httpd.conf ]; then
60 if [ ! -f $1/etc/apache/conf.d/phpmyadmin ]; then
61 cat > $1/etc/apache/conf.d/phpmyadmin <<EOT
62 <IfModule mod_alias.c>
63 Alias /phpmyadmin /usr/share/phpmyadmin
64 </IfModule>
65 <Directory /usr/share/phpmyadmin/>
66 DirectoryIndex index.php
67 Options +FollowSymLinks
68 AllowOverride None
69 Order allow,deny
70 Allow from all
71 </Directory>
72 EOT
73 if [ -z "$1" ]; then
74 # Start Web server.
75 /etc/init.d/apache stop
76 /etc/init.d/apache start
77 fi
78 fi
79 fi
80 }