- change default for PGADMDIR

- preserve existing config
PR:		99958
This commit is contained in:
Dirk Meyer 2007-01-13 10:36:36 +00:00
parent 9ec98bf64f
commit b0e78fd872
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=182291
2 changed files with 17 additions and 3 deletions

View file

@ -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>

View file

@ -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