wok-next view phpmyadmin/receipt @ rev 21727

created recipe for vbindiff
author Hans-G?nter Theisgen
date Sat Nov 21 14:32:44 2020 +0100 (2020-11-21)
parents a3c581bf52b8
children
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 WEB_SITE="https://www.phpmyadmin.net/"
11 TARBALL="phpMyAdmin-$VERSION-all-languages.tar.bz2"
12 WGET_URL="$SF_MIRROR/$PACKAGE/$TARBALL"
14 genpkg_rules() {
15 mkdir -p $fs/usr/share/phpmyadmin $fs/etc/phpmyadmin $fs/usr/share/applications
16 cp -a $src/. $fs/usr/share/phpmyadmin
17 ln -s /etc/phpmyadmin/config.inc.php $fs/usr/share/phpmyadmin/config.inc.php
18 cp $src/config.sample.inc.php $fs/etc/phpmyadmin/config.inc.php
19 rm -f $fs/usr/share/phpmyadmin/phpMyAdmin-$VERSION-all-languages
20 cp $stuff/phpmyadmin.desktop $fs/usr/share/applications
21 chown -R www.www $fs/usr/share/phpmyadmin $fs/etc/phpmyadmin
22 chmod 700 $fs/etc/phpmyadmin
23 chmod 644 $fs/etc/phpmyadmin/config.inc.php
25 sed -i s'/\?>//' $fs/etc/phpmyadmin/config.inc.php
27 cat >> $fs/etc/phpmyadmin/config.inc.php <<"EOT"
29 $cfg['McryptDisableWarning'] = true;
30 // For public use you may comment the following lines
31 // to enforce the security.
32 $cfg['Servers'][$i]['AllowNoPassword'] = true;
33 $cfg['Servers'][$i]['AllowNoPasswordRoot'] = true;
34 $cfg['Servers'][$i]['AllowRoot'] = true;
35 ?>
36 EOT
37 DEPENDS="php-mysqli"
38 SUGGESTED="php-mcrypt"
39 CONFIG_FILES="/etc/phpmyadmin/config.inc.php"
40 }
42 post_install() {
43 secret=$(dd if=/dev/urandom count=1 2>/dev/null | md5sum | sed 's/ .*//')
44 sed -i "s/^\(.*blowfish_secret'] = '\)'/\1$secret'/" \
45 "$1/etc/phpmyadmin/config.inc.php"
47 # Configure lighttpd server
48 if [ -f "$1/etc/lighttpd/lighttpd.conf" ]; then
49 if ! grep -q /usr/share/phpmyadmin/ "$1/etc/lighttpd/lighttpd.conf"; then
50 sed -e 's|.*"/examples/" => "/usr/share/examples/",| "/examples/" => "/usr/share/examples/",\n "/phpmyadmin/" => "/usr/share/phpmyadmin/",|g' -i "$1/etc/lighttpd/lighttpd.conf"
51 if [ -z "$1" ]; then
52 # Start Web server.
53 /etc/init.d/lighttpd stop
54 /etc/init.d/lighttpd start
55 fi
56 fi
57 fi
59 # Configure apache server
60 if [ -f "$1/etc/apache/httpd.conf" ]; then
61 if [ ! -f "$1/etc/apache/conf.d/phpmyadmin" ]; then
62 cat > "$1/etc/apache/conf.d/phpmyadmin" <<EOT
63 <IfModule mod_alias.c>
64 Alias /phpmyadmin /usr/share/phpmyadmin
65 </IfModule>
66 <Directory /usr/share/phpmyadmin/>
67 DirectoryIndex index.php
68 Options +FollowSymLinks
69 AllowOverride None
70 Order allow,deny
71 Allow from all
72 </Directory>
73 EOT
74 if [ -z "$1" ]; then
75 # Start Web server.
76 /etc/init.d/apache stop
77 /etc/init.d/apache start
78 fi
79 fi
80 fi
81 }