From 516a0da55e089a4d3278f53883e4814085ee0c16 Mon Sep 17 00:00:00 2001 From: beech Date: Wed, 20 Feb 2008 09:57:47 +0000 Subject: - Update to 0.8.3; - Use SF macro; - Use BZIP2 package; - Respect WWWDIR, and install all docs in DOCSDIR; - OPTIONS to install MySQL, Apache, PHP and ProFTPd-MySQL; - Update/replace pkg-message; - Update and sort pkg-plist. PR: ports/120306 Submitted by: Felippe de Meirelles Motta Approved by: maintainer timeout (two weeks) --- ftp/proma/Makefile | 59 ++++++++++++++++++++++++++++++++++-------- ftp/proma/distinfo | 6 ++--- ftp/proma/files/pkg-message.in | 9 +++++++ ftp/proma/pkg-message | 5 ---- ftp/proma/pkg-plist | 36 +++++++++++--------------- 5 files changed, 75 insertions(+), 40 deletions(-) create mode 100644 ftp/proma/files/pkg-message.in delete mode 100644 ftp/proma/pkg-message (limited to 'ftp') 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 diff --git a/ftp/proma/distinfo b/ftp/proma/distinfo index 2c4dab4ef08c..08d4f9a6cf54 100644 --- a/ftp/proma/distinfo +++ b/ftp/proma/distinfo @@ -1,3 +1,3 @@ -MD5 (proma-0.8.2.tar.gz) = cdf5da188782b7673c14d576a0081de8 -SHA256 (proma-0.8.2.tar.gz) = 37569d8e7bdcc6b1ff11e0bcf197592f92253b44d513cb04c2623f8d6d2e9ad2 -SIZE (proma-0.8.2.tar.gz) = 18523 +MD5 (proma-0.8.3.tar.bz2) = 8fc20ddabae94f6c31ac2b314abca061 +SHA256 (proma-0.8.3.tar.bz2) = 1ce462f7a7b854683d3776b6b6db1821075483a08a0c00248e320eee5bd92295 +SIZE (proma-0.8.3.tar.bz2) = 17099 diff --git a/ftp/proma/files/pkg-message.in b/ftp/proma/files/pkg-message.in new file mode 100644 index 000000000000..fbcba906a0c3 --- /dev/null +++ b/ftp/proma/files/pkg-message.in @@ -0,0 +1,9 @@ +--------------------------------------------------------------- +ProMA is now installed! + +Please, read the following reference for install instructions: + +%%DOCSDIR%%/INSTALL + +Please configure %%WWWDIR%%/config.inc.php with your settings. +--------------------------------------------------------------- diff --git a/ftp/proma/pkg-message b/ftp/proma/pkg-message deleted file mode 100644 index 9ce140f2bba2..000000000000 --- a/ftp/proma/pkg-message +++ /dev/null @@ -1,5 +0,0 @@ ---------------------------------------------------------------- -There are two things that you sdould take care: -1.configure proftpd with 'WITH_MYSQL'. -2.read 'INSTALL' for installation instructions. ---------------------------------------------------------------- diff --git a/ftp/proma/pkg-plist b/ftp/proma/pkg-plist index 22b412d87d70..7ef5811833f1 100644 --- a/ftp/proma/pkg-plist +++ b/ftp/proma/pkg-plist @@ -1,21 +1,15 @@ -%%MYADMDIR%%/docs/COPYING -%%MYADMDIR%%/docs/ChangeLog -%%MYADMDIR%%/docs/INSTALL -%%MYADMDIR%%/docs/README -%%MYADMDIR%%/docs/TODO -%%MYADMDIR%%/docs/UPGRADE -%%MYADMDIR%%/config.inc.php-example -%%MYADMDIR%%/index.php -%%MYADMDIR%%/style.css -%%MYADMDIR%%/libs/admin.lib.php -%%MYADMDIR%%/libs/auth.lib.php -%%MYADMDIR%%/libs/common.lib.php -%%MYADMDIR%%/pages/change.inc.php -%%MYADMDIR%%/pages/register.inc.php -%%MYADMDIR%%/pages/admin.inc.php -%%MYADMDIR%%/pages/main.inc.php -@dirrm %%MYADMDIR%%/docs -@dirrm %%MYADMDIR%%/pages -@dirrm %%MYADMDIR%%/libs -@dirrm %%MYADMDIR%% -@dirrmtry www/data +@unexec if cmp -s %D/%%WWWDIR%%/config.inc.php-example %D/%%WWWDIR%%/config.inc.php; then rm -f %D/%%WWWDIR%%/config.inc.php; fi +%%WWWDIR%%/config.inc.php-example +@exec if [ ! -f %D/%%WWWDIR%%/config.inc.php ] ; then cp -p %D/%F %B/config.inc.php; fi +%%WWWDIR%%/index.php +%%WWWDIR%%/style.css +%%WWWDIR%%/libs/admin.lib.php +%%WWWDIR%%/libs/auth.lib.php +%%WWWDIR%%/libs/common.lib.php +%%WWWDIR%%/pages/admin.inc.php +%%WWWDIR%%/pages/change.inc.php +%%WWWDIR%%/pages/main.inc.php +%%WWWDIR%%/pages/register.inc.php +@dirrm %%WWWDIR%%/pages +@dirrm %%WWWDIR%%/libs +@dirrm %%WWWDIR%% -- cgit