wok view phpmyadmin/receipt @ rev 23833

updated picard (1.4.0.5 -> 2.3.1)
author Hans-G?nter Theisgen
date Mon Jun 01 07:18:17 2020 +0100 (2020-06-01)
parents 84a3b4b621e1
children 848e2021d813
line source
1 # SliTaz package receipt.
3 PACKAGE="phpmyadmin"
4 VERSION="5.0.2"
5 CATEGORY="misc"
6 SHORT_DESC="Administration of MySQL over the Web."
7 MAINTAINER="pascal.bellard@slitaz.org"
8 LICENSE="GPL2"
9 WEB_SITE="https://www.phpmyadmin.net/"
11 SOURCE="phpMyAdmin"
12 TARBALL="$PACKAGE-$VERSION.tar.xz"
13 WGET_URL="https://files.phpmyadmin.net/$SOURCE/$VERSION/$SOURCE-$VERSION-all-languages.tar.xz"
15 DEPENDS="php-mysqli"
17 CONFIG_FILES="/etc/phpmyadmin/config.inc.php"
19 HOST_ARCH="any"
21 # Rules to gen a SliTaz package suitable for Tazpkg.
22 genpkg_rules()
23 {
24 mkdir -p $fs/usr/share/phpmyadmin
25 mkdir -p $fs/etc/phpmyadmin
26 mkdir -p $fs/usr/share/applications
28 cp -a $src/. $fs/usr/share/phpmyadmin
29 ln -s /etc/phpmyadmin/config.inc.php $fs/usr/share/phpmyadmin/config.inc.php
30 cp $src/config.sample.inc.php $fs/etc/phpmyadmin/config.inc.php
31 rm -f $fs/usr/share/phpmyadmin/phpMyAdmin-$VERSION-all-languages
32 cp $stuff/phpmyadmin.desktop $fs/usr/share/applications
33 chown -R www.www $fs/usr/share/phpmyadmin $fs/etc/phpmyadmin
34 chmod 700 $fs/etc/phpmyadmin
35 chmod 644 $fs/etc/phpmyadmin/config.inc.php
37 sed -i s'/\?>//' $fs/etc/phpmyadmin/config.inc.php
39 cat <<"EOT">> $fs/etc/phpmyadmin/config.inc.php
41 $cfg['McryptDisableWarning'] = true;
42 // For public use you may comment the following lines
43 // to enforce the security.
44 $cfg['Servers'][$i]['AllowNoPassword'] = true;
45 $cfg['Servers'][$i]['AllowNoPasswordRoot'] = true;
46 $cfg['Servers'][$i]['AllowRoot'] = true;
47 ?>
48 EOT
49 }
51 post_install()
52 {
53 secret=$(dd if=/dev/urandom count=1 2> /dev/null | md5sum | sed 's/ .*//')
54 sed -i "s/^\(.*blowfish_secret'] = '\)'/\1$secret'/" \
55 "$1/etc/phpmyadmin/config.inc.php"
57 # Configure lighttpd server
58 if [ -f "$1/etc/lighttpd/lighttpd.conf" ]
59 then
60 if ! grep -q /usr/share/phpmyadmin/ "$1/etc/lighttpd/lighttpd.conf"
61 then
62 sed -e 's|.*"/examples/" => "/usr/share/examples/",| "/examples/" => "/usr/share/examples/",\n "/phpmyadmin/" => "/usr/share/phpmyadmin/",|g' -i "$1/etc/lighttpd/lighttpd.conf"
63 if [ -z "$1" ]
64 then
65 # Start Web server.
66 /etc/init.d/lighttpd stop
67 /etc/init.d/lighttpd start
68 fi
69 fi
70 fi
72 # Configure apache server
73 if [ -f "$1/etc/apache/httpd.conf" ]
74 then
75 if [ ! -f "$1/etc/apache/conf.d/phpmyadmin" ]
76 then
77 cat > "$1/etc/apache/conf.d/phpmyadmin" <<EOT
78 <IfModule mod_alias.c>
79 Alias /phpmyadmin /usr/share/phpmyadmin
80 </IfModule>
81 <Directory /usr/share/phpmyadmin/>
82 DirectoryIndex index.php
83 Options +FollowSymLinks
84 AllowOverride None
85 Order allow,deny
86 Allow from all
87 </Directory>
88 EOT
89 if [ -z "$1" ]
90 then
91 # Start Web server.
92 /etc/init.d/apache stop
93 /etc/init.d/apache start
94 fi
95 fi
96 fi
97 }