wok annotate phppgadmin/receipt @ rev 23807

eudev: include relocated udevadm
author Richard Dunbar <mojo@slitaz.org>
date Sun May 24 12:23:14 2020 -0400 (2020-05-24)
parents 9e01bc6321ea
children 5ea0ce1cecc0
rev   line source
pascal@1149 1 # SliTaz package receipt.
pascal@1149 2
pascal@1149 3 PACKAGE="phppgadmin"
Hans-G?nter@23430 4 VERSION="7.12.1"
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@1149 20 # Rules to gen a SliTaz package suitable for Tazpkg.
pascal@1149 21 genpkg_rules()
pascal@1149 22 {
Hans-G?nter@23430 23 mkdir -p $fs/usr/share/phppgadmin
Hans-G?nter@23430 24 mkdir -p $fs/etc
Hans-G?nter@23430 25 mkdir -p $fs/usr/share/applications
Hans-G?nter@23430 26
Hans-G?nter@23430 27 cp -a $src/. $fs/usr/share/phppgadmin
Hans-G?nter@23430 28 mv $fs/usr/share/phppgadmin/conf $fs/etc/phppgadmin
Hans-G?nter@23430 29 ln -s /etc/phppgadmin $fs/usr/share/phppgadmin/conf
Hans-G?nter@23430 30 mv -f $fs/etc/phppgadmin/config.inc.php-dist \
Hans-G?nter@23430 31 $fs/etc/phppgadmin/config.inc.php
pascal@1152 32 sed -i -e "s/conf\['extra_login_security'\] = true/conf['extra_login_security'] = false/" $fs/etc/phppgadmin/config.inc.php
Hans-G?nter@23430 33 cp stuff/phppgadmin.desktop $fs/usr/share/applications
Hans-G?nter@23430 34 chown -R www.www $fs/usr/share/phppgadmin
Hans-G?nter@23430 35 chown -R www.www $fs/etc/phppgadmin
Hans-G?nter@23430 36 chmod 700 $fs/etc/phppgadmin
Hans-G?nter@23430 37 chmod 600 $fs/etc/phppgadmin/*
pascal@1149 38 }
pascal@1149 39
pascal@1149 40 post_install()
pascal@1149 41 {
pascal@1314 42 # Configure lighttpd server
Hans-G?nter@23430 43 if [ -f "$1/etc/lighttpd/lighttpd.conf" ]
Hans-G?nter@23430 44 then
Hans-G?nter@23430 45 if ! grep -q /usr/share/phppgadmin/ "$1/etc/lighttpd/lighttpd.conf"
Hans-G?nter@23430 46 then
Hans-G?nter@23430 47 sed -e 's|.*"/examples/" => "/usr/share/examples/",| "/examples/" => "/usr/share/examples/",\n "/phppgadmin/" => "/usr/share/phppgadmin/",|g' -i "$1/etc/lighttpd/lighttpd.conf"
Hans-G?nter@23430 48 if [ -z "$1" ]
Hans-G?nter@23430 49 then
pascal@1149 50 # Start Web server.
pascal@1149 51 /etc/init.d/lighttpd stop
pascal@1149 52 /etc/init.d/lighttpd start
pascal@1149 53 fi
pascal@1149 54 fi
pascal@1149 55 fi
Hans-G?nter@23430 56
pascal@1314 57 # Configure apache server
Hans-G?nter@23430 58 if [ -f "$1/etc/apache/httpd.conf" ]
Hans-G?nter@23430 59 then
Hans-G?nter@23430 60 if [ ! -f "$1/etc/apache/conf.d/phppgadmin" ]
Hans-G?nter@23430 61 then
pascal@18730 62 cat > "$1/etc/apache/conf.d/phppgadmin" <<EOT
pascal@1314 63 <IfModule mod_alias.c>
pascal@1314 64 Alias /phppgadmin /usr/share/phppgadmin
pascal@1314 65 </IfModule>
pascal@1314 66 <DirectoryMatch /usr/share/phppgadmin/>
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
pascal@1314 72 </DirectoryMatch>
pascal@1314 73 EOT
Hans-G?nter@23430 74 if [ -z "$1" ]
Hans-G?nter@23430 75 then
pascal@1314 76 # Start Web server.
pascal@1314 77 /etc/init.d/apache stop
pascal@1314 78 /etc/init.d/apache start
pascal@1314 79 fi
pascal@1314 80 fi
pascal@1314 81 fi
pascal@1311 82 cat << EOT
pascal@1311 83 ------
pascal@1311 84 User 'postgres' can login on localhost without passwd after:
pascal@1311 85 # /etc/init.d/postgresql start
pascal@1311 86 ------
pascal@1311 87 EOT
pascal@1149 88 }