wok annotate phppgadmin/receipt @ rev 25697
dool: reduced size of package
author | Hans-G?nter Theisgen |
---|---|
date | Sun May 12 07:10:04 2024 +0100 (5 weeks ago) |
parents | 020433b7aef7 |
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@25603 | 20 # What is the latest version available today? |
pascal@24055 | 21 current_version() |
pascal@24055 | 22 { |
pascal@25603 | 23 wget -O - ${WGET_URL%/arch*}/tags 2>/dev/null | \ |
pascal@25603 | 24 sed '/tag\//!d;s|.*tag/[A-Z_]*||;s|".*||;s|-|.|g;q' |
pascal@24055 | 25 } |
pascal@24055 | 26 |
pascal@1149 | 27 # Rules to gen a SliTaz package suitable for Tazpkg. |
pascal@1149 | 28 genpkg_rules() |
pascal@1149 | 29 { |
Hans-G?nter@23430 | 30 mkdir -p $fs/usr/share/phppgadmin |
Hans-G?nter@23430 | 31 mkdir -p $fs/etc |
Hans-G?nter@23430 | 32 mkdir -p $fs/usr/share/applications |
Hans-G?nter@23430 | 33 |
Hans-G?nter@23430 | 34 cp -a $src/. $fs/usr/share/phppgadmin |
Hans-G?nter@23430 | 35 mv $fs/usr/share/phppgadmin/conf $fs/etc/phppgadmin |
Hans-G?nter@23430 | 36 ln -s /etc/phppgadmin $fs/usr/share/phppgadmin/conf |
Hans-G?nter@23430 | 37 mv -f $fs/etc/phppgadmin/config.inc.php-dist \ |
Hans-G?nter@23430 | 38 $fs/etc/phppgadmin/config.inc.php |
Hans-G?nter@25138 | 39 sed -i -e "s/conf\['extra_login_security'\] = true/conf['extra_login_security'] = false/" \ |
Hans-G?nter@25138 | 40 $fs/etc/phppgadmin/config.inc.php |
Hans-G?nter@23430 | 41 cp stuff/phppgadmin.desktop $fs/usr/share/applications |
Hans-G?nter@23430 | 42 chown -R www.www $fs/usr/share/phppgadmin |
Hans-G?nter@23430 | 43 chown -R www.www $fs/etc/phppgadmin |
Hans-G?nter@23430 | 44 chmod 700 $fs/etc/phppgadmin |
Hans-G?nter@23430 | 45 chmod 600 $fs/etc/phppgadmin/* |
pascal@1149 | 46 } |
pascal@1149 | 47 |
pascal@1149 | 48 post_install() |
pascal@1149 | 49 { |
pascal@1314 | 50 # Configure lighttpd server |
Hans-G?nter@23430 | 51 if [ -f "$1/etc/lighttpd/lighttpd.conf" ] |
Hans-G?nter@23430 | 52 then |
Hans-G?nter@23430 | 53 if ! grep -q /usr/share/phppgadmin/ "$1/etc/lighttpd/lighttpd.conf" |
Hans-G?nter@23430 | 54 then |
Hans-G?nter@25138 | 55 sed -e 's|.*"/examples/" => "/usr/share/examples/",| "/examples/" => "/usr/share/examples/",\n "/phppgadmin/" => "/usr/share/phppgadmin/",|g' \ |
Hans-G?nter@25138 | 56 -i "$1/etc/lighttpd/lighttpd.conf" |
Hans-G?nter@23430 | 57 if [ -z "$1" ] |
Hans-G?nter@23430 | 58 then |
pascal@1149 | 59 # Start Web server. |
pascal@1149 | 60 /etc/init.d/lighttpd stop |
pascal@1149 | 61 /etc/init.d/lighttpd start |
pascal@1149 | 62 fi |
pascal@1149 | 63 fi |
pascal@1149 | 64 fi |
Hans-G?nter@23430 | 65 |
pascal@1314 | 66 # Configure apache server |
Hans-G?nter@23430 | 67 if [ -f "$1/etc/apache/httpd.conf" ] |
Hans-G?nter@23430 | 68 then |
Hans-G?nter@23430 | 69 if [ ! -f "$1/etc/apache/conf.d/phppgadmin" ] |
Hans-G?nter@23430 | 70 then |
pascal@18730 | 71 cat > "$1/etc/apache/conf.d/phppgadmin" <<EOT |
pascal@1314 | 72 <IfModule mod_alias.c> |
pascal@1314 | 73 Alias /phppgadmin /usr/share/phppgadmin |
pascal@1314 | 74 </IfModule> |
pascal@1314 | 75 <DirectoryMatch /usr/share/phppgadmin/> |
pascal@1314 | 76 DirectoryIndex index.php |
pascal@1314 | 77 Options +FollowSymLinks |
pascal@1314 | 78 AllowOverride None |
pascal@1314 | 79 Order allow,deny |
pascal@1314 | 80 Allow from all |
pascal@1314 | 81 </DirectoryMatch> |
pascal@1314 | 82 EOT |
Hans-G?nter@23430 | 83 if [ -z "$1" ] |
Hans-G?nter@23430 | 84 then |
pascal@1314 | 85 # Start Web server. |
pascal@1314 | 86 /etc/init.d/apache stop |
pascal@1314 | 87 /etc/init.d/apache start |
pascal@1314 | 88 fi |
pascal@1314 | 89 fi |
pascal@1314 | 90 fi |
pascal@1311 | 91 cat << EOT |
pascal@1311 | 92 ------ |
pascal@1311 | 93 User 'postgres' can login on localhost without passwd after: |
pascal@1311 | 94 # /etc/init.d/postgresql start |
pascal@1311 | 95 ------ |
pascal@1311 | 96 EOT |
pascal@1149 | 97 } |