diff options
author | Dirk Meyer <dinoex@FreeBSD.org> | 2007-01-13 10:36:36 +0000 |
---|---|---|
committer | Dirk Meyer <dinoex@FreeBSD.org> | 2007-01-13 10:36:36 +0000 |
commit | b0e78fd8722117f12f17f4349fde377d309e89b7 (patch) | |
tree | e6f5112df288ea3aadbc8caf0084a98bd1d0aa1e /databases/phppgadmin | |
parent | Fix typo (diff) |
- change default for PGADMDIR
- preserve existing config
PR: 99958
Notes
Notes:
svn path=/head/; revision=182291
Diffstat (limited to 'databases/phppgadmin')
-rw-r--r-- | databases/phppgadmin/Makefile | 19 | ||||
-rw-r--r-- | databases/phppgadmin/pkg-plist | 1 |
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 |