wok-next view phpmyadmin/receipt @ rev 1653

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