wok-next annotate phpmyadmin/receipt @ rev 21229
updated clamav (0.99.4 -> 0.101.1)
author | Hans-G?nter Theisgen |
---|---|
date | Tue Dec 03 16:54:38 2019 +0100 (2019-12-03) |
parents | a3c581bf52b8 |
children |
rev | line source |
---|---|
pascal@1144 | 1 # SliTaz package receipt. |
pascal@1144 | 2 |
pascal@1144 | 3 PACKAGE="phpmyadmin" |
erjo@13177 | 4 VERSION="3.5.2" |
pascal@1144 | 5 CATEGORY="misc" |
al@21020 | 6 SHORT_DESC="Administration of MySQL over the Web" |
pascal@1145 | 7 MAINTAINER="pascal.bellard@slitaz.org" |
pascal@15198 | 8 LICENSE="GPL2" |
al@20906 | 9 WEB_SITE="https://www.phpmyadmin.net/" |
al@21020 | 10 |
al@21020 | 11 TARBALL="phpMyAdmin-$VERSION-all-languages.tar.bz2" |
pascal@1144 | 12 WGET_URL="$SF_MIRROR/$PACKAGE/$TARBALL" |
pascal@1144 | 13 |
al@21020 | 14 genpkg_rules() { |
pascal@1244 | 15 mkdir -p $fs/usr/share/phpmyadmin $fs/etc/phpmyadmin $fs/usr/share/applications |
pascal@1144 | 16 cp -a $src/. $fs/usr/share/phpmyadmin |
erjo@4384 | 17 ln -s /etc/phpmyadmin/config.inc.php $fs/usr/share/phpmyadmin/config.inc.php |
pascal@1144 | 18 cp $src/config.sample.inc.php $fs/etc/phpmyadmin/config.inc.php |
pascal@1244 | 19 rm -f $fs/usr/share/phpmyadmin/phpMyAdmin-$VERSION-all-languages |
slaxemulator@10131 | 20 cp $stuff/phpmyadmin.desktop $fs/usr/share/applications |
pascal@1144 | 21 chown -R www.www $fs/usr/share/phpmyadmin $fs/etc/phpmyadmin |
pascal@1144 | 22 chmod 700 $fs/etc/phpmyadmin |
erjo@4384 | 23 chmod 644 $fs/etc/phpmyadmin/config.inc.php |
al@21020 | 24 |
erjo@4384 | 25 sed -i s'/\?>//' $fs/etc/phpmyadmin/config.inc.php |
al@21020 | 26 |
al@21020 | 27 cat >> $fs/etc/phpmyadmin/config.inc.php <<"EOT" |
erjo@4384 | 28 |
erjo@4384 | 29 $cfg['McryptDisableWarning'] = true; |
al@21020 | 30 // For public use you may comment the following lines |
erjo@4384 | 31 // to enforce the security. |
erjo@4384 | 32 $cfg['Servers'][$i]['AllowNoPassword'] = true; |
erjo@4384 | 33 $cfg['Servers'][$i]['AllowNoPasswordRoot'] = true; |
erjo@4384 | 34 $cfg['Servers'][$i]['AllowRoot'] = true; |
erjo@4384 | 35 ?> |
erjo@4384 | 36 EOT |
al@21020 | 37 DEPENDS="php-mysqli" |
al@21020 | 38 SUGGESTED="php-mcrypt" |
al@21020 | 39 CONFIG_FILES="/etc/phpmyadmin/config.inc.php" |
pascal@1144 | 40 } |
pascal@1144 | 41 |
al@21020 | 42 post_install() { |
al@21020 | 43 secret=$(dd if=/dev/urandom count=1 2>/dev/null | md5sum | sed 's/ .*//') |
pascal@15385 | 44 sed -i "s/^\(.*blowfish_secret'] = '\)'/\1$secret'/" \ |
pascal@18730 | 45 "$1/etc/phpmyadmin/config.inc.php" |
al@21020 | 46 |
pascal@1314 | 47 # Configure lighttpd server |
pascal@18730 | 48 if [ -f "$1/etc/lighttpd/lighttpd.conf" ]; then |
pascal@18730 | 49 if ! grep -q /usr/share/phpmyadmin/ "$1/etc/lighttpd/lighttpd.conf"; then |
al@21020 | 50 sed -e 's|.*"/examples/" => "/usr/share/examples/",| "/examples/" => "/usr/share/examples/",\n "/phpmyadmin/" => "/usr/share/phpmyadmin/",|g' -i "$1/etc/lighttpd/lighttpd.conf" |
pascal@1144 | 51 if [ -z "$1" ]; then |
pascal@1144 | 52 # Start Web server. |
pascal@1144 | 53 /etc/init.d/lighttpd stop |
pascal@1144 | 54 /etc/init.d/lighttpd start |
pascal@1144 | 55 fi |
pascal@1144 | 56 fi |
pascal@1144 | 57 fi |
al@21020 | 58 |
pascal@1314 | 59 # Configure apache server |
pascal@18730 | 60 if [ -f "$1/etc/apache/httpd.conf" ]; then |
pascal@18730 | 61 if [ ! -f "$1/etc/apache/conf.d/phpmyadmin" ]; then |
pascal@18730 | 62 cat > "$1/etc/apache/conf.d/phpmyadmin" <<EOT |
pascal@1314 | 63 <IfModule mod_alias.c> |
pascal@1314 | 64 Alias /phpmyadmin /usr/share/phpmyadmin |
pascal@1314 | 65 </IfModule> |
erjo@13177 | 66 <Directory /usr/share/phpmyadmin/> |
pascal@1314 | 67 DirectoryIndex index.php |
pascal@1314 | 68 Options +FollowSymLinks |
pascal@1314 | 69 AllowOverride None |
pascal@1314 | 70 Order allow,deny |
pascal@1314 | 71 Allow from all |
erjo@13177 | 72 </Directory> |
pascal@1314 | 73 EOT |
pascal@1314 | 74 if [ -z "$1" ]; then |
pascal@1314 | 75 # Start Web server. |
pascal@1314 | 76 /etc/init.d/apache stop |
pascal@1314 | 77 /etc/init.d/apache start |
pascal@1314 | 78 fi |
pascal@1314 | 79 fi |
pascal@1314 | 80 fi |
pascal@1144 | 81 } |