aboutsummaryrefslogtreecommitdiffstats
path: root/databases
diff options
context:
space:
mode:
authordinoex <dinoex@FreeBSD.org>2007-01-13 18:36:36 +0800
committerdinoex <dinoex@FreeBSD.org>2007-01-13 18:36:36 +0800
commitbce8d257997c4a8d04b0f37aef80674b64e1d38e (patch)
treee1351af42af387935096cbbd8d9e54c199bd7bd1 /databases
parent48f23978e5b582b1b9a5c1adb2d9e83d66126ff7 (diff)
downloadfreebsd-ports-gnome-bce8d257997c4a8d04b0f37aef80674b64e1d38e.tar.gz
freebsd-ports-gnome-bce8d257997c4a8d04b0f37aef80674b64e1d38e.tar.zst
freebsd-ports-gnome-bce8d257997c4a8d04b0f37aef80674b64e1d38e.zip
- change default for PGADMDIR
- preserve existing config PR: 99958
Diffstat (limited to 'databases')
-rw-r--r--databases/phppgadmin/Makefile19
-rw-r--r--databases/phppgadmin/pkg-plist1
2 files changed, 17 insertions, 3 deletions
diff --git a/databases/phppgadmin/Makefile b/databases/phppgadmin/Makefile
index e55e48dcda37..404f228f27fc 100644
--- a/databases/phppgadmin/Makefile
+++ b/databases/phppgadmin/Makefile
@@ -7,6 +7,7 @@
PORTNAME= phppgadmin
PORTVERSION= 4.0.1
+PORTREVISION= 1
CATEGORIES= databases www
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE_EXTENDED}
MASTER_SITE_SUBDIR= ${PORTNAME}
@@ -15,13 +16,19 @@ DISTNAME= phpPgAdmin-${PORTVERSION}
MAINTAINER= dinoex@FreeBSD.org
COMMENT= Web Based Postgres Administration
-USE_BZIP2= yes
+USE_BZIP2= YES
.if !defined(WITHOUT_PHP_DEPENDS)
USE_PHP= pgsql pcre session
.endif
NO_BUILD= YES
-PGADMDIR?= www/data-dist/phpPgAdmin
+PGADMDIR?= www/phpPgAdmin
PLIST_SUB+= PGADMDIR=${PGADMDIR}
+PGADMOLDDIR?= www/data-dist/phpPgAdmin
+PLIST_SUB+= PGADMOLDDIR=${PGADMOLDDIR}
+
+pre-everything::
+ @${ECHO_CMD} "# you can customize the installation directory"
+ @${ECHO_CMD} "# by setting PGADMDIR in /etc/make.conf"
do-configure:
${REINPLACE_CMD} -e "s|/usr/bin/pg|${LOCALBASE}/bin/pg|" \
@@ -29,10 +36,16 @@ do-configure:
${RM} -f ${WRKSRC}/conf/config.inc.php \
${WRKSRC}/conf/config.inc.php-dist.bak
+.include <bsd.port.pre.mk>
+
do-install:
${MKDIR} ${PREFIX}/${PGADMDIR}
${CP} -Rp ${WRKSRC}/ ${PREFIX}/${PGADMDIR}/
+.if exists(${DESTDIR}${PREFIX}/${PGADMOLDDIR}/conf/config.inc.php)
+ ${CP} -np ${DESTDIR}${PREFIX}/${PGADMOLDDIR}/conf/config.inc.php \
+ ${PREFIX}/${PGADMDIR}/conf/config.inc.php
+.endif
${CP} -np ${PREFIX}/${PGADMDIR}/conf/config.inc.php-dist \
${PREFIX}/${PGADMDIR}/conf/config.inc.php
-.include <bsd.port.mk>
+.include <bsd.port.post.mk>
diff --git a/databases/phppgadmin/pkg-plist b/databases/phppgadmin/pkg-plist
index 1fa7aabb04be..9823868289f8 100644
--- a/databases/phppgadmin/pkg-plist
+++ b/databases/phppgadmin/pkg-plist
@@ -29,6 +29,7 @@
%%PGADMDIR%%/classes/plugins/Slony.php
@unexec if cmp -s %D/%%PGADMDIR%%/conf/config.inc.php %D/%%PGADMDIR%%/conf/config.inc.php-dist; then rm -f %D/%%PGADMDIR%%/conf/config.inc.php; fi
%%PGADMDIR%%/conf/config.inc.php-dist
+@exec cp -np %D/%%PGADMOLDDIR%%/conf/config.inc.php %B/config.inc.php
@exec cp -np %B/%f %B/config.inc.php
%%PGADMDIR%%/constraints.php
%%PGADMDIR%%/conversions.php