wok-6.x annotate phppgadmin/receipt @ rev 24723
updated libcap, libcap-dev and libcap-pam (2.33 -> 2.63)
author | Hans-G?nter Theisgen |
---|---|
date | Tue Mar 15 10:34:20 2022 +0100 (2022-03-15) |
parents | fea693604883 |
children | 020433b7aef7 |
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@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 |
pascal@1152 | 38 sed -i -e "s/conf\['extra_login_security'\] = true/conf['extra_login_security'] = false/" $fs/etc/phppgadmin/config.inc.php |
Hans-G?nter@23430 | 39 cp stuff/phppgadmin.desktop $fs/usr/share/applications |
Hans-G?nter@23430 | 40 chown -R www.www $fs/usr/share/phppgadmin |
Hans-G?nter@23430 | 41 chown -R www.www $fs/etc/phppgadmin |
Hans-G?nter@23430 | 42 chmod 700 $fs/etc/phppgadmin |
Hans-G?nter@23430 | 43 chmod 600 $fs/etc/phppgadmin/* |
pascal@1149 | 44 } |
pascal@1149 | 45 |
pascal@1149 | 46 post_install() |
pascal@1149 | 47 { |
pascal@1314 | 48 # Configure lighttpd server |
Hans-G?nter@23430 | 49 if [ -f "$1/etc/lighttpd/lighttpd.conf" ] |
Hans-G?nter@23430 | 50 then |
Hans-G?nter@23430 | 51 if ! grep -q /usr/share/phppgadmin/ "$1/etc/lighttpd/lighttpd.conf" |
Hans-G?nter@23430 | 52 then |
Hans-G?nter@23430 | 53 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 | 54 if [ -z "$1" ] |
Hans-G?nter@23430 | 55 then |
pascal@1149 | 56 # Start Web server. |
pascal@1149 | 57 /etc/init.d/lighttpd stop |
pascal@1149 | 58 /etc/init.d/lighttpd start |
pascal@1149 | 59 fi |
pascal@1149 | 60 fi |
pascal@1149 | 61 fi |
Hans-G?nter@23430 | 62 |
pascal@1314 | 63 # Configure apache server |
Hans-G?nter@23430 | 64 if [ -f "$1/etc/apache/httpd.conf" ] |
Hans-G?nter@23430 | 65 then |
Hans-G?nter@23430 | 66 if [ ! -f "$1/etc/apache/conf.d/phppgadmin" ] |
Hans-G?nter@23430 | 67 then |
pascal@18730 | 68 cat > "$1/etc/apache/conf.d/phppgadmin" <<EOT |
pascal@1314 | 69 <IfModule mod_alias.c> |
pascal@1314 | 70 Alias /phppgadmin /usr/share/phppgadmin |
pascal@1314 | 71 </IfModule> |
pascal@1314 | 72 <DirectoryMatch /usr/share/phppgadmin/> |
pascal@1314 | 73 DirectoryIndex index.php |
pascal@1314 | 74 Options +FollowSymLinks |
pascal@1314 | 75 AllowOverride None |
pascal@1314 | 76 Order allow,deny |
pascal@1314 | 77 Allow from all |
pascal@1314 | 78 </DirectoryMatch> |
pascal@1314 | 79 EOT |
Hans-G?nter@23430 | 80 if [ -z "$1" ] |
Hans-G?nter@23430 | 81 then |
pascal@1314 | 82 # Start Web server. |
pascal@1314 | 83 /etc/init.d/apache stop |
pascal@1314 | 84 /etc/init.d/apache start |
pascal@1314 | 85 fi |
pascal@1314 | 86 fi |
pascal@1314 | 87 fi |
pascal@1311 | 88 cat << EOT |
pascal@1311 | 89 ------ |
pascal@1311 | 90 User 'postgres' can login on localhost without passwd after: |
pascal@1311 | 91 # /etc/init.d/postgresql start |
pascal@1311 | 92 ------ |
pascal@1311 | 93 EOT |
pascal@1149 | 94 } |