wok-current annotate phppgadmin/receipt @ rev 1244
php*admin: add desktop entry
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Tue Aug 12 06:27:41 2008 +0000 (2008-08-12) |
parents | 534023d6e005 |
children | 2b4792182cf0 |
rev | line source |
---|---|
pascal@1149 | 1 # SliTaz package receipt. |
pascal@1149 | 2 |
pascal@1149 | 3 PACKAGE="phppgadmin" |
pascal@1149 | 4 VERSION="4.2" |
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@1149 | 8 SOURCE="phpPgAdmin" |
pascal@1149 | 9 TARBALL="$SOURCE-$VERSION.tar.bz2" |
pascal@1149 | 10 WEB_SITE="http://$PACKAGE.sourceforge.net/" |
pascal@1149 | 11 WGET_URL="$SF_MIRROR/$PACKAGE/$TARBALL" |
pascal@1149 | 12 DEPENDS="php-pgsql" |
pascal@1212 | 13 CONFIG_FILES="/etc/phppgadmin/config.inc.php" |
pascal@1149 | 14 |
pascal@1149 | 15 # Rules to configure and make the package. |
pascal@1149 | 16 compile_rules() |
pascal@1149 | 17 { |
pascal@1149 | 18 echo "$src compiled..." |
pascal@1149 | 19 } |
pascal@1149 | 20 |
pascal@1149 | 21 # Rules to gen a SliTaz package suitable for Tazpkg. |
pascal@1149 | 22 genpkg_rules() |
pascal@1149 | 23 { |
pascal@1244 | 24 mkdir -p $fs/usr/share/phppgadmin $fs/etc $fs/usr/share/applications |
pascal@1149 | 25 cp -a $src/. $fs/usr/share/phppgadmin |
pascal@1149 | 26 mv $fs/usr/share/phppgadmin/conf $fs/etc/phppgadmin |
pascal@1149 | 27 ln -s /etc/phppgadmin $fs/usr/share/phppgadmin/conf |
pascal@1152 | 28 sed -i -e "s/conf\['extra_login_security'\] = true/conf['extra_login_security'] = false/" $fs/etc/phppgadmin/config.inc.php |
pascal@1244 | 29 cp stuff/phppgadmin.desktop $fs/usr/share/applications |
pascal@1149 | 30 chown -R www.www $fs/usr/share/phppgadmin $fs/etc/phppgadmin |
pascal@1149 | 31 chmod 700 $fs/etc/phppgadmin |
pascal@1149 | 32 chmod 600 $fs/etc/phppgadmin/* |
pascal@1149 | 33 } |
pascal@1149 | 34 |
pascal@1149 | 35 post_install() |
pascal@1149 | 36 { |
pascal@1152 | 37 ( cd $1/ ; cpio -o -H newc | gzip -9 ) > \ |
pascal@1152 | 38 $1/$INSTALLED/$PACKAGE/volatile.cpio.gz <<EOT |
pascal@1152 | 39 etc/phppgadmin/config.inc.php |
pascal@1152 | 40 EOT |
pascal@1149 | 41 if [ -f $1/etc/lighttpd/lighttpd.conf ]; then |
pascal@1149 | 42 if ! grep -q /usr/share/phppgadmin/ $1/etc/lighttpd/lighttpd.conf; then |
pascal@1149 | 43 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 | 44 if [ -z "$1" ]; then |
pascal@1149 | 45 # Start Web server. |
pascal@1149 | 46 /etc/init.d/lighttpd stop |
pascal@1149 | 47 /etc/init.d/lighttpd start |
pascal@1149 | 48 fi |
pascal@1149 | 49 fi |
pascal@1149 | 50 fi |
pascal@1149 | 51 } |
pascal@1149 | 52 |
pascal@1152 | 53 repack_cleanup() |
pascal@1152 | 54 { |
pascal@1152 | 55 zcat $INSTALLED/$PACKAGE/volatile.cpio.gz | ( cd $1 ; cpio -id ) |
pascal@1152 | 56 } |