wok-current annotate phppgadmin/receipt @ rev 25586

Fix linux build with gcc > 6 again
author Stanislas Leduc <shann@slitaz.org>
date Mon May 29 12:23:26 2023 +0000 (19 months ago)
parents 5ea0ce1cecc0
children
rev   line source
pascal@1149 1 # SliTaz package receipt.
pascal@1149 2
pascal@1149 3 PACKAGE="phppgadmin"
Hans-G?nter@25138 4 VERSION="7.13.0"
pascal@1149 5 CATEGORY="misc"
pascal@1149 6 SHORT_DESC="Administration of postgresql over the Web."
pascal@1149 7 MAINTAINER="pascal.bellard@slitaz.org"
pascal@15198 8 LICENSE="GPL2"
Hans-G?nter@23430 9 WEB_SITE="https://github.com/phppgadmin/phppgadmin/"
Hans-G?nter@23430 10
Hans-G?nter@23430 11 TARBALL="$PACKAGE-$VERSION.tar.gz"
Hans-G?nter@23430 12 WGET_URL="${WEB_SITE}archive/REL_${VERSION//./-}.tar.gz"
pascal@15198 13
pascal@1149 14 DEPENDS="php-pgsql"
pascal@1149 15
Hans-G?nter@23430 16 CONFIG_FILES="/etc/phppgadmin/config.inc.php"
Hans-G?nter@23430 17
Hans-G?nter@23430 18 HOST_ARCH="any"
Hans-G?nter@23430 19
pascal@24055 20 current_version()
pascal@24055 21 {
pascal@24055 22 wget -O - ${WGET_URL%/arch*}/releases 2>/dev/null | \
pascal@24055 23 sed '/archive.*tar/!d;s|.*/REL_\(.*\).tar.*|\1|;s|-|.|g;q'
pascal@24055 24 }
pascal@24055 25
pascal@1149 26 # Rules to gen a SliTaz package suitable for Tazpkg.
pascal@1149 27 genpkg_rules()
pascal@1149 28 {
Hans-G?nter@23430 29 mkdir -p $fs/usr/share/phppgadmin
Hans-G?nter@23430 30 mkdir -p $fs/etc
Hans-G?nter@23430 31 mkdir -p $fs/usr/share/applications
Hans-G?nter@23430 32
Hans-G?nter@23430 33 cp -a $src/. $fs/usr/share/phppgadmin
Hans-G?nter@23430 34 mv $fs/usr/share/phppgadmin/conf $fs/etc/phppgadmin
Hans-G?nter@23430 35 ln -s /etc/phppgadmin $fs/usr/share/phppgadmin/conf
Hans-G?nter@23430 36 mv -f $fs/etc/phppgadmin/config.inc.php-dist \
Hans-G?nter@23430 37 $fs/etc/phppgadmin/config.inc.php
Hans-G?nter@25138 38 sed -i -e "s/conf\['extra_login_security'\] = true/conf['extra_login_security'] = false/" \
Hans-G?nter@25138 39 $fs/etc/phppgadmin/config.inc.php
Hans-G?nter@23430 40 cp stuff/phppgadmin.desktop $fs/usr/share/applications
Hans-G?nter@23430 41 chown -R www.www $fs/usr/share/phppgadmin
Hans-G?nter@23430 42 chown -R www.www $fs/etc/phppgadmin
Hans-G?nter@23430 43 chmod 700 $fs/etc/phppgadmin
Hans-G?nter@23430 44 chmod 600 $fs/etc/phppgadmin/*
pascal@1149 45 }
pascal@1149 46
pascal@1149 47 post_install()
pascal@1149 48 {
pascal@1314 49 # Configure lighttpd server
Hans-G?nter@23430 50 if [ -f "$1/etc/lighttpd/lighttpd.conf" ]
Hans-G?nter@23430 51 then
Hans-G?nter@23430 52 if ! grep -q /usr/share/phppgadmin/ "$1/etc/lighttpd/lighttpd.conf"
Hans-G?nter@23430 53 then
Hans-G?nter@25138 54 sed -e 's|.*"/examples/" => "/usr/share/examples/",| "/examples/" => "/usr/share/examples/",\n "/phppgadmin/" => "/usr/share/phppgadmin/",|g' \
Hans-G?nter@25138 55 -i "$1/etc/lighttpd/lighttpd.conf"
Hans-G?nter@23430 56 if [ -z "$1" ]
Hans-G?nter@23430 57 then
pascal@1149 58 # Start Web server.
pascal@1149 59 /etc/init.d/lighttpd stop
pascal@1149 60 /etc/init.d/lighttpd start
pascal@1149 61 fi
pascal@1149 62 fi
pascal@1149 63 fi
Hans-G?nter@23430 64
pascal@1314 65 # Configure apache server
Hans-G?nter@23430 66 if [ -f "$1/etc/apache/httpd.conf" ]
Hans-G?nter@23430 67 then
Hans-G?nter@23430 68 if [ ! -f "$1/etc/apache/conf.d/phppgadmin" ]
Hans-G?nter@23430 69 then
pascal@18730 70 cat > "$1/etc/apache/conf.d/phppgadmin" <<EOT
pascal@1314 71 <IfModule mod_alias.c>
pascal@1314 72 Alias /phppgadmin /usr/share/phppgadmin
pascal@1314 73 </IfModule>
pascal@1314 74 <DirectoryMatch /usr/share/phppgadmin/>
pascal@1314 75 DirectoryIndex index.php
pascal@1314 76 Options +FollowSymLinks
pascal@1314 77 AllowOverride None
pascal@1314 78 Order allow,deny
pascal@1314 79 Allow from all
pascal@1314 80 </DirectoryMatch>
pascal@1314 81 EOT
Hans-G?nter@23430 82 if [ -z "$1" ]
Hans-G?nter@23430 83 then
pascal@1314 84 # Start Web server.
pascal@1314 85 /etc/init.d/apache stop
pascal@1314 86 /etc/init.d/apache start
pascal@1314 87 fi
pascal@1314 88 fi
pascal@1314 89 fi
pascal@1311 90 cat << EOT
pascal@1311 91 ------
pascal@1311 92 User 'postgres' can login on localhost without passwd after:
pascal@1311 93 # /etc/init.d/postgresql start
pascal@1311 94 ------
pascal@1311 95 EOT
pascal@1149 96 }