wok annotate phpmyadmin/receipt @ rev 7834
Up: pidgin to 2.7.9.
author | Christopher Rogers <slaxemulator@gmail.com> |
---|---|
date | Mon Dec 27 07:41:05 2010 +0000 (2010-12-27) |
parents | ac62717b2e7d |
children | c2529f6c1a92 |
rev | line source |
---|---|
pascal@1144 | 1 # SliTaz package receipt. |
pascal@1144 | 2 |
pascal@1144 | 3 PACKAGE="phpmyadmin" |
slaxemulator@7453 | 4 VERSION="3.3.8.1" |
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" |
pascal@1144 | 10 WEB_SITE="http://www.$PACKAGE.net/" |
pascal@1144 | 11 WGET_URL="$SF_MIRROR/$PACKAGE/$TARBALL" |
erjo@4384 | 12 SUGGESTED="php-mcrypt" |
pascal@1144 | 13 DEPENDS="php-mysql" |
pascal@1212 | 14 CONFIG_FILES="/etc/phpmyadmin/config.inc.php" |
pascal@1144 | 15 |
pascal@1144 | 16 # Rules to configure and make the package. |
pascal@1144 | 17 compile_rules() |
pascal@1144 | 18 { |
pascal@1146 | 19 [ -L $src ] || ln -s $PHPMYADM $src |
pascal@1144 | 20 } |
pascal@1144 | 21 |
pascal@1144 | 22 # Rules to gen a SliTaz package suitable for Tazpkg. |
pascal@1144 | 23 genpkg_rules() |
pascal@1144 | 24 { |
pascal@1244 | 25 mkdir -p $fs/usr/share/phpmyadmin $fs/etc/phpmyadmin $fs/usr/share/applications |
pascal@1144 | 26 cp -a $src/. $fs/usr/share/phpmyadmin |
erjo@4384 | 27 ln -s /etc/phpmyadmin/config.inc.php $fs/usr/share/phpmyadmin/config.inc.php |
pascal@1144 | 28 cp $src/config.sample.inc.php $fs/etc/phpmyadmin/config.inc.php |
pascal@1244 | 29 rm -f $fs/usr/share/phpmyadmin/phpMyAdmin-$VERSION-all-languages |
pascal@1244 | 30 cp stuff/phpmyadmin.desktop $fs/usr/share/applications |
pascal@1144 | 31 chown -R www.www $fs/usr/share/phpmyadmin $fs/etc/phpmyadmin |
pascal@1144 | 32 chmod 700 $fs/etc/phpmyadmin |
erjo@4384 | 33 chmod 644 $fs/etc/phpmyadmin/config.inc.php |
erjo@4384 | 34 |
erjo@4384 | 35 sed -i s'/\?>//' $fs/etc/phpmyadmin/config.inc.php |
erjo@4384 | 36 |
erjo@4384 | 37 cat <<"EOT">> $fs/etc/phpmyadmin/config.inc.php |
erjo@4384 | 38 |
erjo@4384 | 39 $cfg['McryptDisableWarning'] = true; |
erjo@4384 | 40 // For public use you may comment the following lines |
erjo@4384 | 41 // to enforce the security. |
erjo@4384 | 42 $cfg['Servers'][$i]['AllowNoPassword'] = true; |
erjo@4384 | 43 $cfg['Servers'][$i]['AllowNoPasswordRoot'] = true; |
erjo@4384 | 44 $cfg['Servers'][$i]['AllowRoot'] = true; |
erjo@4384 | 45 ?> |
erjo@4384 | 46 EOT |
pascal@1144 | 47 } |
pascal@1144 | 48 |
pascal@1144 | 49 post_install() |
pascal@1144 | 50 { |
pascal@1314 | 51 # Configure lighttpd server |
pascal@1144 | 52 if [ -f $1/etc/lighttpd/lighttpd.conf ]; then |
pascal@1144 | 53 if ! grep -q /usr/share/phpmyadmin/ $1/etc/lighttpd/lighttpd.conf; then |
pascal@1144 | 54 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 | 55 if [ -z "$1" ]; then |
pascal@1144 | 56 # Start Web server. |
pascal@1144 | 57 /etc/init.d/lighttpd stop |
pascal@1144 | 58 /etc/init.d/lighttpd start |
pascal@1144 | 59 fi |
pascal@1144 | 60 fi |
pascal@1144 | 61 fi |
pascal@1314 | 62 # Configure apache server |
pascal@1314 | 63 if [ -f $1/etc/apache/httpd.conf ]; then |
pascal@1314 | 64 if [ ! -f $1/etc/apache/conf.d/phpmyadmin ]; then |
pascal@1314 | 65 cat > $1/etc/apache/conf.d/phpmyadmin <<EOT |
pascal@1314 | 66 <IfModule mod_alias.c> |
pascal@1314 | 67 Alias /phpmyadmin /usr/share/phpmyadmin |
pascal@1314 | 68 </IfModule> |
pascal@1314 | 69 <DirectoryMatch /usr/share/phpmyadmin/> |
pascal@1314 | 70 DirectoryIndex index.php |
pascal@1314 | 71 Options +FollowSymLinks |
pascal@1314 | 72 AllowOverride None |
pascal@1314 | 73 Order allow,deny |
pascal@1314 | 74 Allow from all |
pascal@1314 | 75 </DirectoryMatch> |
pascal@1314 | 76 EOT |
pascal@1314 | 77 if [ -z "$1" ]; then |
pascal@1314 | 78 # Start Web server. |
pascal@1314 | 79 /etc/init.d/apache stop |
pascal@1314 | 80 /etc/init.d/apache start |
pascal@1314 | 81 fi |
pascal@1314 | 82 fi |
pascal@1314 | 83 fi |
pascal@1144 | 84 } |