aboutsummaryrefslogtreecommitdiff
path: root/dns
diff options
context:
space:
mode:
authorMartin Wilke <miwi@FreeBSD.org>2009-07-04 19:28:37 +0000
committerMartin Wilke <miwi@FreeBSD.org>2009-07-04 19:28:37 +0000
commit5ac28ea4ab2b6f9f8e3da32a05a1558ca19f9159 (patch)
treeca2eb6f6a24afa6d8d1c6b2fcc0c26030c6c5ed8 /dns
parent6e9f616d7a008836c41e5083700fe2b0e66564c1 (diff)
downloadports-5ac28ea4ab2b6f9f8e3da32a05a1558ca19f9159.tar.gz
ports-5ac28ea4ab2b6f9f8e3da32a05a1558ca19f9159.zip
Notes
Diffstat (limited to 'dns')
-rw-r--r--dns/poweradmin/Makefile43
-rw-r--r--dns/poweradmin/distinfo6
-rw-r--r--dns/poweradmin/pkg-plist60
-rw-r--r--dns/poweradmin/pkg-plist-chunk5
4 files changed, 44 insertions, 70 deletions
diff --git a/dns/poweradmin/Makefile b/dns/poweradmin/Makefile
index 70dbc57bddbc..0f4413b7d738 100644
--- a/dns/poweradmin/Makefile
+++ b/dns/poweradmin/Makefile
@@ -1,12 +1,12 @@
# New ports collection makefile for: poweradmin
-# Date created: 19 January 2005
+# Date created: 19 January 2005
# Whom: geo
#
# $FreeBSD$
#
PORTNAME= poweradmin
-PORTVERSION= 2.1.2
+PORTVERSION= 2.1.3
CATEGORIES= dns www
MASTER_SITES= https://www.poweradmin.org/download/
EXTRACT_SUFX= .tgz
@@ -23,22 +23,51 @@ 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 --git a/dns/poweradmin/distinfo b/dns/poweradmin/distinfo
index 2d7dfd83371c..e8f086e7b159 100644
--- a/dns/poweradmin/distinfo
+++ b/dns/poweradmin/distinfo
@@ -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 --git a/dns/poweradmin/pkg-plist b/dns/poweradmin/pkg-plist
deleted file mode 100644
index ca3e151d0b5a..000000000000
--- a/dns/poweradmin/pkg-plist
+++ /dev/null
@@ -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
-@dirrm www/poweradmin/style
-@dirrm www/poweradmin/locale/nl_NL/LC_MESSAGES
-@dirrm www/poweradmin/locale/nl_NL
-@dirrm www/poweradmin/locale/en_EN/LC_MESSAGES
-@dirrm www/poweradmin/locale/en_EN
-@dirrm www/poweradmin/locale
-@dirrm www/poweradmin/inc
-@dirrm www/poweradmin/images
-@dirrm www/poweradmin/docs
-@dirrm www/poweradmin
diff --git a/dns/poweradmin/pkg-plist-chunk b/dns/poweradmin/pkg-plist-chunk
new file mode 100644
index 000000000000..e5603a52254c
--- /dev/null
+++ b/dns/poweradmin/pkg-plist-chunk
@@ -0,0 +1,5 @@
+@mode 640
+@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
+@exec if [ ! -f %B/inc/config.inc.php ] ; then cp -p %B/%f %B/inc/config.inc.php; fi
+@mode