wok-next annotate phppgadmin/receipt @ rev 20861
gnutls: up (3.5.18); add libpsl and publicsuffix-list; sed: up (4.5); tar: up (1.30); tcpdump: up (4.9.2); wget: up (1.19.5); xz: up (5.2.4)
author | Aleksej Bobylev <al.bobylev@gmail.com> |
---|---|
date | Thu Jun 28 00:30:02 2018 +0300 (2018-06-28) |
parents | 9e01bc6321ea |
children | d5aab818505e |
rev | line source |
---|---|
pascal@1149 | 1 # SliTaz package receipt. |
pascal@1149 | 2 |
pascal@1149 | 3 PACKAGE="phppgadmin" |
pascal@16788 | 4 VERSION="5.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" |
pascal@1149 | 9 SOURCE="phpPgAdmin" |
pascal@1149 | 10 TARBALL="$SOURCE-$VERSION.tar.bz2" |
pascal@1149 | 11 WEB_SITE="http://$PACKAGE.sourceforge.net/" |
pascal@1149 | 12 WGET_URL="$SF_MIRROR/$PACKAGE/$TARBALL" |
pascal@15198 | 13 CONFIG_FILES="/etc/phppgadmin/config.inc.php" |
pascal@15198 | 14 |
pascal@1149 | 15 DEPENDS="php-pgsql" |
pascal@1149 | 16 |
pascal@1149 | 17 # Rules to gen a SliTaz package suitable for Tazpkg. |
pascal@1149 | 18 genpkg_rules() |
pascal@1149 | 19 { |
pascal@1244 | 20 mkdir -p $fs/usr/share/phppgadmin $fs/etc $fs/usr/share/applications |
pascal@1149 | 21 cp -a $src/. $fs/usr/share/phppgadmin |
pascal@1149 | 22 mv $fs/usr/share/phppgadmin/conf $fs/etc/phppgadmin |
pascal@1149 | 23 ln -s /etc/phppgadmin $fs/usr/share/phppgadmin/conf |
slaxemulator@7008 | 24 mv -f $fs/etc/phppgadmin/config.inc.php-dist $fs/etc/phppgadmin/config.inc.php |
pascal@1152 | 25 sed -i -e "s/conf\['extra_login_security'\] = true/conf['extra_login_security'] = false/" $fs/etc/phppgadmin/config.inc.php |
pascal@1244 | 26 cp stuff/phppgadmin.desktop $fs/usr/share/applications |
pascal@1149 | 27 chown -R www.www $fs/usr/share/phppgadmin $fs/etc/phppgadmin |
pascal@1149 | 28 chmod 700 $fs/etc/phppgadmin |
pascal@1149 | 29 chmod 600 $fs/etc/phppgadmin/* |
pascal@1149 | 30 } |
pascal@1149 | 31 |
pascal@1149 | 32 post_install() |
pascal@1149 | 33 { |
pascal@1314 | 34 # Configure lighttpd server |
pascal@18730 | 35 if [ -f "$1/etc/lighttpd/lighttpd.conf" ]; then |
pascal@18730 | 36 if ! grep -q /usr/share/phppgadmin/ "$1/etc/lighttpd/lighttpd.conf"; then |
pascal@18730 | 37 sed -e 's|.*"/examples/" => "/usr/share/examples/",| "/examples/" => "/usr/share/examples/",\n "/phppgadmin/" => "/usr/share/phppgadmin/",|g' -i "$1/etc/lighttpd/lighttpd.conf" |
pascal@1149 | 38 if [ -z "$1" ]; then |
pascal@1149 | 39 # Start Web server. |
pascal@1149 | 40 /etc/init.d/lighttpd stop |
pascal@1149 | 41 /etc/init.d/lighttpd start |
pascal@1149 | 42 fi |
pascal@1149 | 43 fi |
pascal@1149 | 44 fi |
pascal@1314 | 45 # Configure apache server |
pascal@18730 | 46 if [ -f "$1/etc/apache/httpd.conf" ]; then |
pascal@18730 | 47 if [ ! -f "$1/etc/apache/conf.d/phppgadmin" ]; then |
pascal@18730 | 48 cat > "$1/etc/apache/conf.d/phppgadmin" <<EOT |
pascal@1314 | 49 <IfModule mod_alias.c> |
pascal@1314 | 50 Alias /phppgadmin /usr/share/phppgadmin |
pascal@1314 | 51 </IfModule> |
pascal@1314 | 52 <DirectoryMatch /usr/share/phppgadmin/> |
pascal@1314 | 53 DirectoryIndex index.php |
pascal@1314 | 54 Options +FollowSymLinks |
pascal@1314 | 55 AllowOverride None |
pascal@1314 | 56 Order allow,deny |
pascal@1314 | 57 Allow from all |
pascal@1314 | 58 </DirectoryMatch> |
pascal@1314 | 59 EOT |
pascal@1314 | 60 if [ -z "$1" ]; then |
pascal@1314 | 61 # Start Web server. |
pascal@1314 | 62 /etc/init.d/apache stop |
pascal@1314 | 63 /etc/init.d/apache start |
pascal@1314 | 64 fi |
pascal@1314 | 65 fi |
pascal@1314 | 66 fi |
pascal@1311 | 67 cat << EOT |
pascal@1311 | 68 ------ |
pascal@1311 | 69 User 'postgres' can login on localhost without passwd after: |
pascal@1311 | 70 # /etc/init.d/postgresql start |
pascal@1311 | 71 ------ |
pascal@1311 | 72 EOT |
pascal@1149 | 73 } |