wok view phpmyadmin/receipt @ rev 25474

openjdk-6-src: use find from findutils in place of busybox find
author Hans-G?nter Theisgen
date Thu Oct 13 16:42:57 2022 +0100 (2022-10-13)
parents fb22330086d8
children 96982f54e3dc
line source
1 # SliTaz package receipt.
3 PACKAGE="phpmyadmin"
4 VERSION="5.1.1"
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 SUGGESTED="php-mcrypt"
16 DEPENDS="php-mysqli"
18 CONFIG_FILES="/etc/phpmyadmin/config.inc.php"
20 HOST_ARCH="any"
22 current_version()
23 {
24 wget -O - $WEB_SITE 2>/dev/null | \
25 sed '/phpMyAdmin-/!d;s|.*phpMyAdmin-||;s|-all.*||;q'
26 }
28 # Rules to gen a SliTaz package suitable for Tazpkg.
29 genpkg_rules()
30 {
31 mkdir -p $fs/usr/share/phpmyadmin
32 mkdir -p $fs/etc/phpmyadmin
33 mkdir -p $fs/usr/share/applications
35 cp -a $src/. $fs/usr/share/phpmyadmin
36 ln -s /etc/phpmyadmin/config.inc.php $fs/usr/share/phpmyadmin/config.inc.php
37 cp $src/config.sample.inc.php $fs/etc/phpmyadmin/config.inc.php
38 rm -f $fs/usr/share/phpmyadmin/phpMyAdmin-$VERSION-all-languages
39 cp $stuff/phpmyadmin.desktop $fs/usr/share/applications
40 chown -R www.www $fs/usr/share/phpmyadmin
41 chown -R www.www $fs/etc/phpmyadmin
42 chmod 700 $fs/etc/phpmyadmin
43 chmod 644 $fs/etc/phpmyadmin/config.inc.php
45 sed -i s'/\?>//' $fs/etc/phpmyadmin/config.inc.php
47 cat <<"EOT">> $fs/etc/phpmyadmin/config.inc.php
49 $cfg['McryptDisableWarning'] = true;
50 // For public use you may comment the following lines
51 // to enforce the security.
52 $cfg['Servers'][$i]['AllowNoPassword'] = true;
53 $cfg['Servers'][$i]['AllowNoPasswordRoot'] = true;
54 $cfg['Servers'][$i]['AllowRoot'] = true;
55 ?>
56 EOT
57 }
59 post_install()
60 {
61 secret=$(dd if=/dev/urandom count=1 2> /dev/null | md5sum | sed 's/ .*//')
62 sed -i "s/^\(.*blowfish_secret'] = '\)'/\1$secret'/" \
63 "$1/etc/phpmyadmin/config.inc.php"
65 # Configure lighttpd server
66 if [ -f "$1/etc/lighttpd/lighttpd.conf" ]
67 then
68 if ! grep -q /usr/share/phpmyadmin/ "$1/etc/lighttpd/lighttpd.conf"
69 then
70 sed -e 's|.*"/examples/" => "/usr/share/examples/",| "/examples/" => "/usr/share/examples/",\n "/phpmyadmin/" => "/usr/share/phpmyadmin/",|g' -i "$1/etc/lighttpd/lighttpd.conf"
71 if [ -z "$1" ]
72 then
73 # Start Web server.
74 /etc/init.d/lighttpd stop
75 /etc/init.d/lighttpd start
76 fi
77 fi
78 fi
80 # Configure apache server
81 if [ -f "$1/etc/apache/httpd.conf" ]
82 then
83 if [ ! -f "$1/etc/apache/conf.d/phpmyadmin" ]
84 then
85 cat > "$1/etc/apache/conf.d/phpmyadmin" <<EOT
86 <IfModule mod_alias.c>
87 Alias /phpmyadmin /usr/share/phpmyadmin
88 </IfModule>
89 <Directory /usr/share/phpmyadmin/>
90 DirectoryIndex index.php
91 Options +FollowSymLinks
92 AllowOverride None
93 Order allow,deny
94 Allow from all
95 </Directory>
96 EOT
97 if [ -z "$1" ]
98 then
99 # Start Web server.
100 /etc/init.d/apache stop
101 /etc/init.d/apache start
102 fi
103 fi
104 fi
105 }