wok annotate phpmyadmin/receipt @ rev 13429

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