aboutsummaryrefslogtreecommitdiffstats
path: root/www/thundercache/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'www/thundercache/Makefile')
-rw-r--r--www/thundercache/Makefile50
1 files changed, 38 insertions, 12 deletions
diff --git a/www/thundercache/Makefile b/www/thundercache/Makefile
index b8a6c602659a..2fa0e6e2888e 100644
--- a/www/thundercache/Makefile
+++ b/www/thundercache/Makefile
@@ -12,14 +12,15 @@ CATEGORIES= www
MASTER_SITES= http://www.bmsoftware.org/freebsd/ \
http://www6.freebsdbrasil.com.br/~eksffa/l/dev/thunder/ \
${MASTER_SITE_LOCAL}/jmelo
-DISTNAME= thunder32bits_17032010
+DISTNAME= thunder32bits_29032010
MAINTAINER= eksffa@freebsdbrasil.com.br
COMMENT= High-performance and high-eficiency caching proxy system
-BROKEN= calls false in default configuration
-
-OPTIONS= DEPENDACK "I have read and understood the depends needs" off
+OPTIONS= DEPENDACK "I have read and understood the depends needs" on \
+ APACHE "Install apache for reporting viewing" on \
+ PHP "Install PHP for reporting generating" on \
+ PGSQL "Install PostgreSQL (report data storing)" on
USE_OPENSSL= yes
USE_BZIP2= yes
@@ -39,25 +40,35 @@ BROKEN= Won't run on systems version < FreeBSD 8.0-RELEASE
.endif
.if ${ARCH} == "amd64"
-DISTNAME= thunder64bits_17032010
+DISTNAME= thunder64bits_29032010
.endif
WRKSRC= ${WRKDIR}/thunder
-USE_PHP+= curl pcre bcmath pdo mcrypt mhash session pgsql
+.if defined (WITH_APACHE)
+USE_APACHE= 2.0+
+.endif
+
+.if defined (WITH_PGSQL)
USE_PGSQL= yes
WANT_PGSQL_VER= 84
-USE_APACHE= 2.0+
+RUN_DEPENDS+= postgresql-server>=0:${PORTSDIR}/databases/postgresql${PGSQL_VER}-server
+.endif
+
+.if defined(WITH_PHP)
+USE_PHP+= curl pcre bcmath pdo mcrypt mhash session pgsql
+.endif
LIB_DEPENDS+= curl.6:${PORTSDIR}/ftp/curl:install
-RUN_DEPENDS+= sudo:${PORTSDIR}/security/sudo \
- postgresql-server>=0:${PORTSDIR}/databases/postgresql${PGSQL_VER}-server \
- ${LOCALBASE}/lib/php/${PHP_EXT_DIR}/pdo_pgsql.so:${PORTSDIR}/databases/php5-pdo_pgsql
-SUB_FILES= pkg-message log.sh
+.if defined(APACHE+PHP) && defined(WITH_PGSQL)
+LIB_DEPENDS+= ${LOCALBASE}/lib/php/${PHP_EXT_DIR}/pdo_pgsql.so:${PORTSDIR}/databases/php5-pdo_pgsql
+.endif
+
+SUB_FILES= pkg-message log.sh test-deps.sh
+SUB_LIST= "GREP=${GREP}"
pre-everything::
-.if !defined(WITH_DEPENDACK)
@${ECHO_MSG} ""
@${ECHO_MSG} "ATTENTION:"
@${ECHO_MSG} ""
@@ -73,12 +84,27 @@ pre-everything::
@${ECHO_MSG} " After you understood it correctly, select DEPENDACK on"
@${ECHO_MSG} " the OPTIONS screen. Run ''make config'' to acknowledge"
@${ECHO_MSG} ""
+.if !defined(WITH_DEPENDACK)
@${FALSE}
.endif
+pre-install:
+ @(${CHMOD} +x ${WRKDIR}/test-deps.sh ; \
+ if ! ${WRKDIR}/test-deps.sh > /dev/null 2>&1 ; then \
+ ${ECHO_MSG} "FATAL: " ; \
+ ${ECHO_MSG} "Some depends are not built with required features." ; \
+ ${ECHO_MSG} "You must always honor at least the following options" ; \
+ ${ECHO_MSG} "depends as listed:" ; \
+ ${ECHO_MSG} "" ; \
+ ${ECHO_MSG} "ftp/curl LIBSSH2=yes OPENSSL=yes PROXY=yes" ; \
+ ${ECHO_MSG} "" ; \
+ ${FALSE} ; \
+ fi)
+
do-install:
@${CP} -r ${WRKSRC} ${PREFIX}/
${INSTALL_SCRIPT} ${WRKDIR}/log.sh ${PREFIX}/thunder/sbin/
+ @${MKDIR} -m 755 /var/run/thunder
post-install:
@${CAT} ${PKGMESSAGE}