wok annotate phpmyadmin/receipt @ rev 1914
aircrack-ng : Fix DEPENDS
author | Julien Rabier <taziden@slitaz.org> |
---|---|
date | Mon Dec 22 02:10:04 2008 +0100 (2008-12-22) |
parents | 6bfa3b761dd2 |
children | bd6010223726 |
rev | line source |
---|---|
pascal@1144 | 1 # SliTaz package receipt. |
pascal@1144 | 2 |
pascal@1144 | 3 PACKAGE="phpmyadmin" |
pascal@1144 | 4 VERSION="2.11.7.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" |
pascal@1144 | 12 DEPENDS="php-mysql" |
pascal@1212 | 13 CONFIG_FILES="/etc/phpmyadmin/config.inc.php" |
pascal@1144 | 14 |
pascal@1144 | 15 # Rules to configure and make the package. |
pascal@1144 | 16 compile_rules() |
pascal@1144 | 17 { |
pascal@1146 | 18 [ -L $src ] || ln -s $PHPMYADM $src |
pascal@1144 | 19 } |
pascal@1144 | 20 |
pascal@1144 | 21 # Rules to gen a SliTaz package suitable for Tazpkg. |
pascal@1144 | 22 genpkg_rules() |
pascal@1144 | 23 { |
pascal@1244 | 24 mkdir -p $fs/usr/share/phpmyadmin $fs/etc/phpmyadmin $fs/usr/share/applications |
pascal@1144 | 25 cp -a $src/. $fs/usr/share/phpmyadmin |
pascal@1144 | 26 ln -s /etc/phpmyadmin $fs/usr/share/phpmyadmin/config |
pascal@1144 | 27 cp $src/config.sample.inc.php $fs/etc/phpmyadmin/config.inc.php |
pascal@1244 | 28 rm -f $fs/usr/share/phpmyadmin/phpMyAdmin-$VERSION-all-languages |
pascal@1244 | 29 cp stuff/phpmyadmin.desktop $fs/usr/share/applications |
pascal@1144 | 30 chown -R www.www $fs/usr/share/phpmyadmin $fs/etc/phpmyadmin |
pascal@1144 | 31 chmod 700 $fs/etc/phpmyadmin |
pascal@1144 | 32 chmod 600 $fs/etc/phpmyadmin/config.inc.php |
pascal@1144 | 33 } |
pascal@1144 | 34 |
pascal@1144 | 35 post_install() |
pascal@1144 | 36 { |
pascal@1152 | 37 ( cd $1/ ; cpio -o -H newc | gzip -9 ) > \ |
pascal@1152 | 38 $1/$INSTALLED/$PACKAGE/volatile.cpio.gz <<EOT |
pascal@1152 | 39 etc/phpmyadmin/config.inc.php |
pascal@1152 | 40 EOT |
pascal@1314 | 41 # Configure lighttpd server |
pascal@1144 | 42 if [ -f $1/etc/lighttpd/lighttpd.conf ]; then |
pascal@1144 | 43 if ! grep -q /usr/share/phpmyadmin/ $1/etc/lighttpd/lighttpd.conf; then |
pascal@1144 | 44 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 | 45 if [ -z "$1" ]; then |
pascal@1144 | 46 # Start Web server. |
pascal@1144 | 47 /etc/init.d/lighttpd stop |
pascal@1144 | 48 /etc/init.d/lighttpd start |
pascal@1144 | 49 fi |
pascal@1144 | 50 fi |
pascal@1144 | 51 fi |
pascal@1314 | 52 # Configure apache server |
pascal@1314 | 53 if [ -f $1/etc/apache/httpd.conf ]; then |
pascal@1314 | 54 if [ ! -f $1/etc/apache/conf.d/phpmyadmin ]; then |
pascal@1314 | 55 cat > $1/etc/apache/conf.d/phpmyadmin <<EOT |
pascal@1314 | 56 <IfModule mod_alias.c> |
pascal@1314 | 57 Alias /phpmyadmin /usr/share/phpmyadmin |
pascal@1314 | 58 </IfModule> |
pascal@1314 | 59 <DirectoryMatch /usr/share/phpmyadmin/> |
pascal@1314 | 60 DirectoryIndex index.php |
pascal@1314 | 61 Options +FollowSymLinks |
pascal@1314 | 62 AllowOverride None |
pascal@1314 | 63 Order allow,deny |
pascal@1314 | 64 Allow from all |
pascal@1314 | 65 </DirectoryMatch> |
pascal@1314 | 66 EOT |
pascal@1314 | 67 if [ -z "$1" ]; then |
pascal@1314 | 68 # Start Web server. |
pascal@1314 | 69 /etc/init.d/apache stop |
pascal@1314 | 70 /etc/init.d/apache start |
pascal@1314 | 71 fi |
pascal@1314 | 72 fi |
pascal@1314 | 73 fi |
pascal@1144 | 74 } |
pascal@1144 | 75 |
pascal@1152 | 76 repack_cleanup() |
pascal@1152 | 77 { |
pascal@1152 | 78 zcat $INSTALLED/$PACKAGE/volatile.cpio.gz | ( cd $1 ; cpio -id ) |
pascal@1152 | 79 } |