wok annotate phpmyadmin/receipt @ rev 23501

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