wok-6.x view phpmyadmin/receipt @ rev 1152

mysql,postgresql: backup volatile files
author Pascal Bellard <pascal.bellard@slitaz.org>
date Sat Jul 26 17:57:04 2008 +0000 (2008-07-26)
parents b4f5dca41cf5
children 534023d6e005
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"
14 # Rules to configure and make the package.
15 compile_rules()
16 {
17 [ -L $src ] || ln -s $PHPMYADM $src
18 }
20 # Rules to gen a SliTaz package suitable for Tazpkg.
21 genpkg_rules()
22 {
23 mkdir -p $fs/usr/share/phpmyadmin $fs/etc/phpmyadmin
24 cp -a $src/. $fs/usr/share/phpmyadmin
25 ln -s /etc/phpmyadmin $fs/usr/share/phpmyadmin/config
26 cp $src/config.sample.inc.php $fs/etc/phpmyadmin/config.inc.php
27 chown -R www.www $fs/usr/share/phpmyadmin $fs/etc/phpmyadmin
28 chmod 700 $fs/etc/phpmyadmin
29 chmod 600 $fs/etc/phpmyadmin/config.inc.php
30 }
32 post_install()
33 {
34 ( cd $1/ ; cpio -o -H newc | gzip -9 ) > \
35 $1/$INSTALLED/$PACKAGE/volatile.cpio.gz <<EOT
36 etc/phpmyadmin/config.inc.php
37 EOT
38 if [ -f $1/etc/lighttpd/lighttpd.conf ]; then
39 if ! grep -q /usr/share/phpmyadmin/ $1/etc/lighttpd/lighttpd.conf; then
40 sed -e 's|.*"/examples/" => "/usr/share/examples/",| "/examples/" => "/usr/share/examples/",\n "/phpmyadmin/" => "/usr/share/phpmyadmin/",|g' -i $1/etc/lighttpd/lighttpd.conf
41 if [ -z "$1" ]; then
42 # Start Web server.
43 /etc/init.d/lighttpd stop
44 /etc/init.d/lighttpd start
45 fi
46 fi
47 fi
48 }
50 repack_cleanup()
51 {
52 zcat $INSTALLED/$PACKAGE/volatile.cpio.gz | ( cd $1 ; cpio -id )
53 }