wok-next view phpmyadmin/receipt @ rev 20736
netatalk-dev: update depends
author | Aleksej Bobylev <al.bobylev@gmail.com> |
---|---|
date | Tue May 29 20:07:48 2018 +0300 (2018-05-29) |
parents | 9e01bc6321ea |
children | a3c581bf52b8 |
line source
1 # SliTaz package receipt.
3 PACKAGE="phpmyadmin"
4 VERSION="3.5.2"
5 CATEGORY="misc"
6 SHORT_DESC="Administration of MySQL over the Web."
7 MAINTAINER="pascal.bellard@slitaz.org"
8 LICENSE="GPL2"
9 PHPMYADM="phpMyAdmin-$VERSION-all-languages"
10 TARBALL="$PHPMYADM.tar.bz2"
11 WEB_SITE="http://www.phpmyadmin.net/"
12 WGET_URL="$SF_MIRROR/$PACKAGE/$TARBALL"
13 SUGGESTED="php-mcrypt"
14 CONFIG_FILES="/etc/phpmyadmin/config.inc.php"
16 DEPENDS="php-mysqli"
18 # Rules to gen a SliTaz package suitable for Tazpkg.
19 genpkg_rules()
20 {
21 mkdir -p $fs/usr/share/phpmyadmin $fs/etc/phpmyadmin $fs/usr/share/applications
22 cp -a $src/. $fs/usr/share/phpmyadmin
23 ln -s /etc/phpmyadmin/config.inc.php $fs/usr/share/phpmyadmin/config.inc.php
24 cp $src/config.sample.inc.php $fs/etc/phpmyadmin/config.inc.php
25 rm -f $fs/usr/share/phpmyadmin/phpMyAdmin-$VERSION-all-languages
26 cp $stuff/phpmyadmin.desktop $fs/usr/share/applications
27 chown -R www.www $fs/usr/share/phpmyadmin $fs/etc/phpmyadmin
28 chmod 700 $fs/etc/phpmyadmin
29 chmod 644 $fs/etc/phpmyadmin/config.inc.php
31 sed -i s'/\?>//' $fs/etc/phpmyadmin/config.inc.php
33 cat <<"EOT">> $fs/etc/phpmyadmin/config.inc.php
35 $cfg['McryptDisableWarning'] = true;
36 // For public use you may comment the following lines
37 // to enforce the security.
38 $cfg['Servers'][$i]['AllowNoPassword'] = true;
39 $cfg['Servers'][$i]['AllowNoPasswordRoot'] = true;
40 $cfg['Servers'][$i]['AllowRoot'] = true;
41 ?>
42 EOT
43 }
45 post_install()
46 {
47 secret=$(dd if=/dev/urandom count=1 2> /dev/null | md5sum | sed 's/ .*//')
48 sed -i "s/^\(.*blowfish_secret'] = '\)'/\1$secret'/" \
49 "$1/etc/phpmyadmin/config.inc.php"
50 # Configure lighttpd server
51 if [ -f "$1/etc/lighttpd/lighttpd.conf" ]; then
52 if ! grep -q /usr/share/phpmyadmin/ "$1/etc/lighttpd/lighttpd.conf"; then
53 sed -e 's|.*"/examples/" => "/usr/share/examples/",| "/examples/" => "/usr/share/examples/",\n "/phpmyadmin/" => "/usr/share/phpmyadmin/",|g' -i "$1/etc/lighttpd/lighttpd.conf"
54 if [ -z "$1" ]; then
55 # Start Web server.
56 /etc/init.d/lighttpd stop
57 /etc/init.d/lighttpd start
58 fi
59 fi
60 fi
61 # Configure apache server
62 if [ -f "$1/etc/apache/httpd.conf" ]; then
63 if [ ! -f "$1/etc/apache/conf.d/phpmyadmin" ]; then
64 cat > "$1/etc/apache/conf.d/phpmyadmin" <<EOT
65 <IfModule mod_alias.c>
66 Alias /phpmyadmin /usr/share/phpmyadmin
67 </IfModule>
68 <Directory /usr/share/phpmyadmin/>
69 DirectoryIndex index.php
70 Options +FollowSymLinks
71 AllowOverride None
72 Order allow,deny
73 Allow from all
74 </Directory>
75 EOT
76 if [ -z "$1" ]; then
77 # Start Web server.
78 /etc/init.d/apache stop
79 /etc/init.d/apache start
80 fi
81 fi
82 fi
83 }