ports/136067: Update port: dns/poweradmin to 2.1.3

Edmondas Girkantas eg at fbsd.lt
Fri Jun 26 13:40:01 UTC 2009


>Number:         136067
>Category:       ports
>Synopsis:       Update port: dns/poweradmin to 2.1.3
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          maintainer-update
>Submitter-Id:   current-users
>Arrival-Date:   Fri Jun 26 13:40:01 UTC 2009
>Closed-Date:
>Last-Modified:
>Originator:     Edmondas Girkantas
>Release:        7.2-RELEASE-p1
>Organization:
>Environment:
FreeBSD big.bug.lt 7.2-RELEASE-p1 FreeBSD 7.2-RELEASE-p1 #0: Tue Jun  9 21:30:43 UTC 2009     root at i386-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC  i386

>Description:
- updated to 2.1.3 version
- used another method to install files
- keep the configuration file after updating

>How-To-Repeat:

>Fix:
apply given patch

Patch attached with submission follows:

diff -ruN poweradmin.orig/Makefile poweradmin/Makefile
--- poweradmin.orig/Makefile	2009-06-06 10:45:07.000000000 +0300
+++ poweradmin/Makefile	2009-06-26 15:51:25.000000000 +0300
@@ -1,12 +1,12 @@
 # New ports collection makefile for:   poweradmin
-# Date created:        19 January 2005                                       
+# Date created:        19 January 2005
 # Whom:                geo
 #
 # $FreeBSD: ports/dns/poweradmin/Makefile,v 1.4 2009/02/15 23:27:36 beech Exp $
 #
 
 PORTNAME=	poweradmin
-PORTVERSION=	2.1.2
+PORTVERSION=	2.1.3
 CATEGORIES=	dns www
 MASTER_SITES=	https://www.poweradmin.org/download/
 EXTRACT_SUFX=	.tgz
@@ -17,28 +17,56 @@
 USE_PHP=	gettext
 WANT_PHP_WEB=	yes
 NO_BUILD=	yes
-PEARDIR=	${PREFIX}/share/pear
 
 OPTIONS=	POSTGRESQL "Use PostgreSQL database instead of MySQL" off
 
 SUB_FILES=	pkg-message
 
+CFGDIR=		inc
+CFGFILE=	config.inc.php
+
+PLIST=		${WRKDIR}/plist
+
 .include <bsd.port.pre.mk>
 
 .if defined(WITH_POSTGRESQL)
-USE_PHP+=	pgsql
 RUN_DEPENDS+=	${PEARDIR}/MDB2/Driver/pgsql.php:${PORTSDIR}/databases/pear-MDB2_Driver_pgsql
 .else
-USE_PHP+=	mysql
 RUN_DEPENDS+=	${PEARDIR}/MDB2/Driver/mysql.php:${PORTSDIR}/databases/pear-MDB2_Driver_mysql
 .endif
 
 post-extract:
 	@cd ${WRKSRC} && ${RM} -rf "install"
 
-do-install:
-	@${CP} -r ${WRKSRC} ${PREFIX}/www/${PORTNAME}
-	${CP} ${WWWDIR}/inc/config-me.inc.php  ${WWWDIR}/inc/config.inc.php
+post-patch:
+	cd ${WRKSRC} ; \
+	${FIND} . ! -type d ! -name config-me.inc.php | ${SORT} | \
+		${SED} -e "s,^\.,%%WWWDIR%%,"             >${PLIST} ; \
+	${CAT} ${PKGDIR}/pkg-plist-chunk             >>${PLIST} ; \
+	${FIND} . -type d | ${SORT} -r | ${SED} \
+		-e 's!^\./${CFGDIR}$$!@dirrmtry %%WWWDIR%%/${CFGDIR}!' \
+		-e 's!^\.$$!@dirrmtry %%WWWDIR%%!' \
+		-e 's!^\.!@dirrm %%WWWDIR%%!'		>>${PLIST}
+
+do-install: install-app install-conf
+
+install-app:
+	cd ${WRKSRC} ; \
+	for src in $$( ${FIND} . ) ; do \
+		dst=${WWWDIR}$${src#.} ; \
+		if ${TEST} -d $$src ; then \
+			${MKDIR} $$dst ; \
+		else \
+			${INSTALL_DATA} $$src $$dst ; \
+		fi \
+	done
+
+install-conf: install-app
+	cd ${WWWDIR}/${CFGDIR} ; \
+	${CHMOD} 0640 config-me.inc.php ; \
+	if ${TEST} ! -f ${CFGFILE} ; then \
+		${CP} -p config-me.inc.php ${CFGFILE} ; \
+	fi
 
 post-install:
 	@${CAT} ${PKGMESSAGE}
diff -ruN poweradmin.orig/distinfo poweradmin/distinfo
--- poweradmin.orig/distinfo	2009-06-06 10:45:07.000000000 +0300
+++ poweradmin/distinfo	2009-06-06 10:45:26.000000000 +0300
@@ -1,3 +1,3 @@
-MD5 (poweradmin-2.1.2.tgz) = cf83b89c6931160684de52a0b3ea3678
-SHA256 (poweradmin-2.1.2.tgz) = 2e90c05247d416fce704016126abce37f10a6817723008b220ac9c003d194cb8
-SIZE (poweradmin-2.1.2.tgz) = 94314
+MD5 (poweradmin-2.1.3.tgz) = 3647703a40d6d8109f86f6b3cce0d310
+SHA256 (poweradmin-2.1.3.tgz) = 3cc545d0a8979ca6a60f3b41368f1bea827243b94ae7311c0c502f74ef25b2ac
+SIZE (poweradmin-2.1.3.tgz) = 93541
diff -ruN poweradmin.orig/pkg-plist poweradmin/pkg-plist
--- poweradmin.orig/pkg-plist	2009-06-06 10:45:07.000000000 +0300
+++ poweradmin/pkg-plist	1970-01-01 03:00:00.000000000 +0300
@@ -1,60 +0,0 @@
-www/poweradmin/add_perm_templ.php
-www/poweradmin/add_record.php
-www/poweradmin/add_supermaster.php
-www/poweradmin/add_user.php
-www/poweradmin/add_zone_master.php
-www/poweradmin/add_zone_slave.php
-www/poweradmin/change_password.php
-www/poweradmin/delete_domain.php
-www/poweradmin/delete_perm_templ.php
-www/poweradmin/delete_record.php
-www/poweradmin/delete_supermaster.php
-www/poweradmin/delete_user.php
-www/poweradmin/docs/CHANGELOG
-www/poweradmin/docs/LICENSE
-www/poweradmin/docs/README
-www/poweradmin/docs/i18n-template-db.pot
-www/poweradmin/docs/i18n-template-php.pot
-www/poweradmin/docs/poweradmin-mysql-db-structure.sql
-www/poweradmin/docs/poweradmin-pgsql-db-structure.sql
-www/poweradmin/edit.php
-www/poweradmin/edit_perm_templ.php
-www/poweradmin/edit_record.php
-www/poweradmin/edit_user.php
-www/poweradmin/images/arrow.png
-www/poweradmin/images/background.jpg
-www/poweradmin/images/delete.gif
-www/poweradmin/images/edit.gif
-www/poweradmin/inc/auth.inc.php
-www/poweradmin/inc/config.inc.php
-www/poweradmin/inc/config-me.inc.php
-www/poweradmin/inc/database.inc.php
-www/poweradmin/inc/dns.inc.php
-www/poweradmin/inc/error.inc.php
-www/poweradmin/inc/footer.inc.php
-www/poweradmin/inc/header.inc.php
-www/poweradmin/inc/i18n.inc.php
-www/poweradmin/inc/record.inc.php
-www/poweradmin/inc/toolkit.inc.php
-www/poweradmin/inc/users.inc.php
-www/poweradmin/index.php
-www/poweradmin/list_perm_templ.php
-www/poweradmin/list_supermasters.php
-www/poweradmin/list_zones.php
-www/poweradmin/locale/en_EN/LC_MESSAGES/en.po
-www/poweradmin/locale/nl_NL/LC_MESSAGES/messages.mo
-www/poweradmin/locale/nl_NL/LC_MESSAGES/nl.po
-www/poweradmin/robots.txt
-www/poweradmin/search.php
-www/poweradmin/style/example.inc.php
-www/poweradmin/users.php
- at dirrm www/poweradmin/style
- at dirrm www/poweradmin/locale/nl_NL/LC_MESSAGES
- at dirrm www/poweradmin/locale/nl_NL
- at dirrm www/poweradmin/locale/en_EN/LC_MESSAGES
- at dirrm www/poweradmin/locale/en_EN
- at dirrm www/poweradmin/locale
- at dirrm www/poweradmin/inc
- at dirrm www/poweradmin/images
- at dirrm www/poweradmin/docs
- at dirrm www/poweradmin
diff -ruN poweradmin.orig/pkg-plist-chunk poweradmin/pkg-plist-chunk
--- poweradmin.orig/pkg-plist-chunk	1970-01-01 03:00:00.000000000 +0300
+++ poweradmin/pkg-plist-chunk	2009-06-26 14:51:22.000000000 +0300
@@ -0,0 +1,5 @@
+ at mode 640
+ at unexec if cmp -s %D/%%WWWDIR%%/inc/config-me.inc.php %D/%%WWWDIR%%/inc/config.inc.php; then rm -f %D/%%WWWDIR%%/inc/config.inc.php; fi
+%%WWWDIR%%/inc/config-me.inc.php
+ at exec if [ ! -f %B/inc/config.inc.php ] ; then cp -p %B/%f %B/inc/config.inc.php; fi
+ at mode


>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list