wok view phppgadmin/receipt @ rev 25603

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