wok annotate phpmyadmin/receipt @ rev 24473
updated ddrescue (1.25 -> 1.26)
author | Hans-G?nter Theisgen |
---|---|
date | Thu Feb 17 15:55:17 2022 +0100 (2022-02-17) |
parents | 15650f5d595b |
children | eb2b710f40e2 |
rev | line source |
---|---|
pascal@1144 | 1 # SliTaz package receipt. |
pascal@1144 | 2 |
pascal@1144 | 3 PACKAGE="phpmyadmin" |
pascal@23973 | 4 VERSION="5.0.4" |
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@24102 | 21 current_version() |
pascal@24102 | 22 { |
pascal@24102 | 23 wget -O - $WEB_SITE 2>/dev/null | \ |
pascal@24384 | 24 sed '/phpMyAdmin-/!d;s|.*phpMyAdmin-||;s|-all.*||;q' |
pascal@24102 | 25 } |
pascal@24102 | 26 |
pascal@1144 | 27 # Rules to gen a SliTaz package suitable for Tazpkg. |
pascal@1144 | 28 genpkg_rules() |
pascal@1144 | 29 { |
Hans-G?nter@23429 | 30 mkdir -p $fs/usr/share/phpmyadmin |
Hans-G?nter@23429 | 31 mkdir -p $fs/etc/phpmyadmin |
Hans-G?nter@23429 | 32 mkdir -p $fs/usr/share/applications |
Hans-G?nter@23429 | 33 |
Hans-G?nter@23429 | 34 cp -a $src/. $fs/usr/share/phpmyadmin |
Hans-G?nter@23429 | 35 ln -s /etc/phpmyadmin/config.inc.php $fs/usr/share/phpmyadmin/config.inc.php |
Hans-G?nter@23429 | 36 cp $src/config.sample.inc.php $fs/etc/phpmyadmin/config.inc.php |
Hans-G?nter@23429 | 37 rm -f $fs/usr/share/phpmyadmin/phpMyAdmin-$VERSION-all-languages |
Hans-G?nter@23429 | 38 cp $stuff/phpmyadmin.desktop $fs/usr/share/applications |
pascal@1144 | 39 chown -R www.www $fs/usr/share/phpmyadmin $fs/etc/phpmyadmin |
Hans-G?nter@23429 | 40 chmod 700 $fs/etc/phpmyadmin |
Hans-G?nter@23429 | 41 chmod 644 $fs/etc/phpmyadmin/config.inc.php |
Hans-G?nter@23429 | 42 |
erjo@4384 | 43 sed -i s'/\?>//' $fs/etc/phpmyadmin/config.inc.php |
erjo@4384 | 44 |
erjo@4384 | 45 cat <<"EOT">> $fs/etc/phpmyadmin/config.inc.php |
erjo@4384 | 46 |
erjo@4384 | 47 $cfg['McryptDisableWarning'] = true; |
erjo@4384 | 48 // For public use you may comment the following lines |
erjo@4384 | 49 // to enforce the security. |
erjo@4384 | 50 $cfg['Servers'][$i]['AllowNoPassword'] = true; |
erjo@4384 | 51 $cfg['Servers'][$i]['AllowNoPasswordRoot'] = true; |
erjo@4384 | 52 $cfg['Servers'][$i]['AllowRoot'] = true; |
erjo@4384 | 53 ?> |
erjo@4384 | 54 EOT |
pascal@1144 | 55 } |
pascal@1144 | 56 |
pascal@1144 | 57 post_install() |
pascal@1144 | 58 { |
pascal@15385 | 59 secret=$(dd if=/dev/urandom count=1 2> /dev/null | md5sum | sed 's/ .*//') |
pascal@15385 | 60 sed -i "s/^\(.*blowfish_secret'] = '\)'/\1$secret'/" \ |
pascal@18730 | 61 "$1/etc/phpmyadmin/config.inc.php" |
Hans-G?nter@23429 | 62 |
pascal@1314 | 63 # Configure lighttpd server |
Hans-G?nter@23429 | 64 if [ -f "$1/etc/lighttpd/lighttpd.conf" ] |
Hans-G?nter@23429 | 65 then |
Hans-G?nter@23429 | 66 if ! grep -q /usr/share/phpmyadmin/ "$1/etc/lighttpd/lighttpd.conf" |
Hans-G?nter@23429 | 67 then |
pascal@18730 | 68 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 | 69 if [ -z "$1" ] |
Hans-G?nter@23429 | 70 then |
pascal@1144 | 71 # Start Web server. |
pascal@1144 | 72 /etc/init.d/lighttpd stop |
pascal@1144 | 73 /etc/init.d/lighttpd start |
pascal@1144 | 74 fi |
pascal@1144 | 75 fi |
pascal@1144 | 76 fi |
Hans-G?nter@23429 | 77 |
pascal@1314 | 78 # Configure apache server |
Hans-G?nter@23429 | 79 if [ -f "$1/etc/apache/httpd.conf" ] |
Hans-G?nter@23429 | 80 then |
Hans-G?nter@23429 | 81 if [ ! -f "$1/etc/apache/conf.d/phpmyadmin" ] |
Hans-G?nter@23429 | 82 then |
pascal@18730 | 83 cat > "$1/etc/apache/conf.d/phpmyadmin" <<EOT |
pascal@1314 | 84 <IfModule mod_alias.c> |
pascal@1314 | 85 Alias /phpmyadmin /usr/share/phpmyadmin |
pascal@1314 | 86 </IfModule> |
erjo@13177 | 87 <Directory /usr/share/phpmyadmin/> |
pascal@1314 | 88 DirectoryIndex index.php |
pascal@1314 | 89 Options +FollowSymLinks |
pascal@1314 | 90 AllowOverride None |
pascal@1314 | 91 Order allow,deny |
pascal@1314 | 92 Allow from all |
erjo@13177 | 93 </Directory> |
pascal@1314 | 94 EOT |
Hans-G?nter@23429 | 95 if [ -z "$1" ] |
Hans-G?nter@23429 | 96 then |
pascal@1314 | 97 # Start Web server. |
pascal@1314 | 98 /etc/init.d/apache stop |
pascal@1314 | 99 /etc/init.d/apache start |
pascal@1314 | 100 fi |
pascal@1314 | 101 fi |
pascal@1314 | 102 fi |
pascal@1144 | 103 } |