aboutsummaryrefslogtreecommitdiff
path: root/ftp/proma/Makefile
diff options
context:
space:
mode:
authorBeech Rintoul <beech@FreeBSD.org>2008-02-20 09:57:47 +0000
committerBeech Rintoul <beech@FreeBSD.org>2008-02-20 09:57:47 +0000
commit08f6685f5f73aee483f52cbff859f092292a1498 (patch)
treed8a0cef47d06c9ba5619a2e16055ce8da5e3b698 /ftp/proma/Makefile
parentd5b997aea075596a32f70c481e064e24351e2efb (diff)
downloadports-08f6685f5f73aee483f52cbff859f092292a1498.tar.gz
ports-08f6685f5f73aee483f52cbff859f092292a1498.zip
Notes
Diffstat (limited to 'ftp/proma/Makefile')
-rw-r--r--ftp/proma/Makefile59
1 files changed, 48 insertions, 11 deletions
diff --git a/ftp/proma/Makefile b/ftp/proma/Makefile
index 781d2c443d7e..ec9b80b5be6d 100644
--- a/ftp/proma/Makefile
+++ b/ftp/proma/Makefile
@@ -6,26 +6,63 @@
#
PORTNAME= proma
-PORTVERSION= 0.8.2
+PORTVERSION= 0.8.3
CATEGORIES= ftp
-MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
-MASTER_SITE_SUBDIR= ${PORTNAME}
+MASTER_SITES= SF
MAINTAINER= sexbear@tmu.edu.tw
-COMMENT= Administrating a ProFTPd server storing users in a MySQL database
+COMMENT= Administrate a ProFTPd server storing users in a MySQL database
+USE_BZIP2= yes
NO_BUILD= yes
-MYADMDIR?= www/data/proma
+PORTDOCS= ChangeLog INSTALL README TODO UPGRADE
+FILES= index.php style.css config.inc.php-example
+LIBS= admin.lib.php auth.lib.php common.lib.php
+PAGES= admin.inc.php change.inc.php main.inc.php register.inc.php
-PLIST_SUB+= MYADMDIR=${MYADMDIR}
+OPTIONS= PROFTPD "Install ProFTPd with MySQL support" off \
+ APACHE "Install Apache Web Server 2.2.x" off \
+ MYSQL "Install MySQL Server 5.x" off \
+ PHP "Install PHP5 with MySQL support" off
+
+SUB_FILES= pkg-message
+
+.if defined(WITH_PROFTPD)
+RUN_DEPENDS+= proftpd:${PORTSDIR}/ftp/proftpd-mysql
+.endif
+.if defined(WITH_APACHE)
+RUN_DEPENDS+= apachectl:${PORTSDIR}/www/apache22
+.endif
+.if defined(WITH_MYSQL)
+RUN_DEPENDS+= mysql:${PORTSDIR}/databases/mysql50-server
+.endif
+.if defined(WITH_PHP)
+RUN_DEPENDS+= php:${PORTSDIR}/lang/php5
+.endif
do-install:
- @${MKDIR} ${PREFIX}/${MYADMDIR}
- ${FIND} ${WRKSRC} ! -path '*/CVS*' | \
- ${XARGS} -n1 ${SH} -c 'if ${TEST} -d $$0; \
- then ${MKDIR} ${PREFIX}/${MYADMDIR}$${0#${WRKSRC}}; \
- else ${INSTALL_DATA} $$0 ${PREFIX}/${MYADMDIR}$${0#${WRKSRC}}; fi'
+.if !defined(NOPORTDOCS)
+ @${INSTALL} -d ${DOCSDIR}
+ @cd ${WRKSRC}/docs && ${INSTALL_DATA} ${PORTDOCS} ${DOCSDIR}/
+.endif
+ @${INSTALL} -d ${WWWDIR}
+ @${INSTALL_DATA} ${FILES:S,^,${WRKSRC}/,} ${WWWDIR}/
+ @${INSTALL} -d ${WWWDIR}/libs
+ @${INSTALL_DATA} ${LIBS:S,^,${WRKSRC}/libs/,} ${WWWDIR}/libs/
+ @${INSTALL} -d ${WWWDIR}/pages
+ @${INSTALL_DATA} ${PAGES:S,^,${WRKSRC}/pages/,} ${WWWDIR}/pages/
+ @${CHOWN} -R ${WWWOWN}:${WWWGRP} ${WWWDIR}
+ @${FIND} ${WWWDIR} -type f -print0 | ${XARGS} -0 ${CHMOD} 644
+ @${FIND} ${WWWDIR} -type d -print0 | ${XARGS} -0 ${CHMOD} 755
+ @${ECHO_CMD} '@exec ${CHOWN} -R ${WWWOWN}:${WWWGRP} \
+ ${WWWDIR}' >> ${TMPPLIST}
+
+post-install:
+ @if [ ! -f ${WWWDIR}/config.inc.php ]; then \
+ ${CP} -p ${WWWDIR}/config.inc.php-example ${WWWDIR}/config.inc.php ; \
+ ${CHMOD} 640 ${WWWDIR}/config.inc.php ; \
+ fi
@${CAT} ${PKGMESSAGE}
.include <bsd.port.mk>