aboutsummaryrefslogtreecommitdiff
path: root/www/cherokee
diff options
context:
space:
mode:
authorPav Lucistnik <pav@FreeBSD.org>2010-09-15 12:29:48 +0000
committerPav Lucistnik <pav@FreeBSD.org>2010-09-15 12:29:48 +0000
commitecbea54dfccc4e307665190f738375933e48ce8d (patch)
tree4516629c55884e0b171d77f7fde8b95c0258dfa5 /www/cherokee
parentda0857b478a2bf0382a44f7decc0be0a9c16c10a (diff)
downloadports-ecbea54dfccc4e307665190f738375933e48ce8d.tar.gz
ports-ecbea54dfccc4e307665190f738375933e48ce8d.zip
Notes
Diffstat (limited to 'www/cherokee')
-rw-r--r--www/cherokee/Makefile47
-rw-r--r--www/cherokee/distinfo6
-rw-r--r--www/cherokee/files/pkg-install.in42
-rw-r--r--www/cherokee/files/pkg-message.in23
-rw-r--r--www/cherokee/pkg-message22
5 files changed, 99 insertions, 41 deletions
diff --git a/www/cherokee/Makefile b/www/cherokee/Makefile
index d8faa1aafa58..4d95a8340125 100644
--- a/www/cherokee/Makefile
+++ b/www/cherokee/Makefile
@@ -6,7 +6,7 @@
#
PORTNAME= cherokee
-PORTVERSION= 1.0.7
+PORTVERSION= 1.0.8
CATEGORIES= www
MASTER_SITES= http://www.cherokee-project.com/download/1.0/${PORTVERSION}/ \
http://cherokee.osuosl.org/1.0/${PORTVERSION}/ \
@@ -51,13 +51,24 @@ USE_OPENSSL= yes
USE_LDCONFIG= yes
USE_GETTEXT= yes
USE_RC_SUBR= cherokee.sh
+SUB_FILES= pkg-install pkg-message
USE_GMAKE= yes
GNU_CONFIGURE= yes
CPPFLAGS= -I${LOCALBASE}/include ${PTHREAD_CFLAGS}
LDFLAGS= -L${LOCALBASE}/lib ${PTHREAD_LIBS}
CONFIGURE_ENV= CPPFLAGS="${CPPFLAGS}" LDFLAGS="${LDFLAGS}"
+
+CHEROKEE_VARDIR?= /var
+CHEROKEE_LOGDIR?= ${CHEROKEE_VARDIR}/log
+CHEROKEE_ACCESSLOG?= ${CHEROKEE_LOGDIR}/cherokee.access
+CHEROKEE_ERRORLOG?= ${CHEROKEE_LOGDIR}/cherokee.error
+
+# Adjust this if you need to run Cherokee as a distinct user:group
+CHEROKEE_USER= www
+CHEROKEE_GROUP= www
+
CONFIGURE_ARGS= --with-wwwroot=${PREFIX}/www/cherokee \
- --localstatedir=/var \
+ --localstatedir=${CHEROKEE_VARDIR} \
--disable-static
DEFCONFS= cherokee.conf
CONFSUBDIRS= ssl mods-available mods-enabled sites-available sites-enabled
@@ -65,17 +76,16 @@ MAN1= cget.1 cherokee-config.1 cherokee.1 cherokee-admin.1 \
cherokee-tweak.1 cherokee-worker.1
PORTDOCS= *
-OPTIONS= WWWUSER "Run as www:www user" on \
- IPV6 "IPv6 support" on \
- MYSQL "MySQL Database" off \
- LDAP "LDAP Support" off \
- GEOIP "GeoIP Support (recommended)" on \
- FFMPEG "FFMpeg Support" off \
- NLS "NLS Support" on \
- INTPCRE "Use Internal PCRE Library" off \
- ADMIN "Build the Admin Interface" on \
- RRDTOOL "Usage Graphs Support" off \
- UWSGI "uWSGI Support" off
+OPTIONS= IPV6 "IPv6 support" on \
+ MYSQL "MySQL Database" off \
+ LDAP "LDAP Support" off \
+ GEOIP "GeoIP Support (recommended)" on \
+ FFMPEG "FFMpeg Support" off \
+ NLS "NLS Support" on \
+ INTPCRE "Use Internal PCRE Library" off \
+ ADMIN "Build the Admin Interface" on \
+ RRDTOOL "Usage Graphs Support" off \
+ UWSGI "uWSGI Support" off
.include <bsd.port.options.mk>
@@ -89,9 +99,7 @@ PLIST_SUB+= ADMIN="@comment "
.include <bsd.port.pre.mk>
-.ifdef WITH_WWWUSER
-CONFIGURE_ARGS+= --with-wwwuser=www --with-wwwgroup=www
-.endif
+CONFIGURE_ARGS+= --with-wwwuser=${CHEROKEE_USER} --with-wwwgroup=${CHEROKEE_GROUP}
.ifdef WITHOUT_IPV6
CONFIGURE_ARGS+= --disable-ipv6
@@ -216,6 +224,13 @@ post-install:
${XARGS} ${PYTHON_CMD} ${PYTHON_LIBDIR}/py_compile.py
.endif
+ @${SETENV} \
+ CHEROKEE_USER=${CHEROKEE_USER} \
+ CHEROKEE_GROUP=${CHEROKEE_GROUP} \
+ CHEROKEE_ERRORLOG=${CHEROKEE_ERRORLOG} \
+ CHEROKEE_ACCESSLOG=${CHEROKEE_ACCESSLOG} \
+ ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
+
@${ECHO_MSG} "==============================================================="
@${CAT} ${PKGMESSAGE}
@${ECHO_MSG} "==============================================================="
diff --git a/www/cherokee/distinfo b/www/cherokee/distinfo
index 99e05307f649..e7cf2f955b73 100644
--- a/www/cherokee/distinfo
+++ b/www/cherokee/distinfo
@@ -1,3 +1,3 @@
-MD5 (cherokee-1.0.7.tar.gz) = 38fe9f70b39a331568be08bd5abc2045
-SHA256 (cherokee-1.0.7.tar.gz) = fb104c4d2b1fded81bb22bc001d761e358cdc3bb53f3159613fccacb98b1b749
-SIZE (cherokee-1.0.7.tar.gz) = 5383836
+MD5 (cherokee-1.0.8.tar.gz) = 12117a80c2a970173bd32660439c2db0
+SHA256 (cherokee-1.0.8.tar.gz) = 45e0f777668f7e1ea13c706bdd7b6519077854a69223ad5d3b2fa30bdc83cf1f
+SIZE (cherokee-1.0.8.tar.gz) = 5384416
diff --git a/www/cherokee/files/pkg-install.in b/www/cherokee/files/pkg-install.in
new file mode 100644
index 000000000000..10f8c5587602
--- /dev/null
+++ b/www/cherokee/files/pkg-install.in
@@ -0,0 +1,42 @@
+#!/bin/sh
+
+PATH=/bin:/usr/bin:/usr/sbin
+
+FILEMODE=0640
+
+C_ACCESSLOG=${CHEROKEE_ACCESSLOG:-/var/log/cherokee.access}
+C_ERRORLOG=${CHEROKEE_ERRORLOG:-/var/log/cherokee.error}
+C_USER=${CHEROKEE_USER:-www}
+C_GROUP=${CHEROKEE_GROUP:-www}
+
+case $2 in
+
+POST-INSTALL)
+ echo "$2 for $1"
+ echo "Adjusting ownership (${C_USER}:${C_GROUP}) and permissions (${FILEMODE}) on log files:"
+ echo "${C_ACCESSLOG}"
+ echo "${C_ERRORLOG}"
+
+ if [ ! -f ${C_ACCESSLOG} ]; then
+ touch ${C_ACCESSLOG}
+ fi
+
+ if [ ! -f ${C_ERRORLOG} ]; then
+ touch ${C_ERRORLOG}
+ fi
+
+ chown ${C_USER}:${C_GROUP} ${C_ACCESSLOG} ${C_ERRORLOG}
+ chmod ${FILEMODE} ${C_ACCESSLOG} ${C_ERRORLOG}
+
+ ;;
+
+
+PRE-INSTALL)
+ echo "Nothing to do in $2"
+ ;;
+
+*)
+ exit 64
+ ;;
+esac
+
diff --git a/www/cherokee/files/pkg-message.in b/www/cherokee/files/pkg-message.in
new file mode 100644
index 000000000000..984166bd5a8b
--- /dev/null
+++ b/www/cherokee/files/pkg-message.in
@@ -0,0 +1,23 @@
+
+ **** PLEASE READ THIS ****
+
+ o To run Cherokee at startup or using the rc script, you need
+ to add
+
+ cherokee_enable="YES"
+
+ in either /etc/rc.conf, /etc/rc.conf.local or
+ /etc/rc.conf.d/cherokee.
+
+ o To start the Cherokee administrative interface, run (as root)
+
+ cherokee-admin
+
+ For more information on cherokee-admin(1), please refer to
+ the official documentation and manpage.
+
+
+ o By default, the cherokee daemon runs as www:www user.
+ If you need it to run as another user, you'll need to manually
+ adjust Makefile and recompile the port.
+
diff --git a/www/cherokee/pkg-message b/www/cherokee/pkg-message
deleted file mode 100644
index d4984af56b35..000000000000
--- a/www/cherokee/pkg-message
+++ /dev/null
@@ -1,22 +0,0 @@
-Please note that if you intend to run Cherokee as www user,
-you'll have to manually create the log files and set the
-proper ownership and permissions on them.
-
-You can do it with (as root):
-
- touch /var/log/cherokee.error /var/log/cherokee.access
- chown -v www:www /var/log/cherokee.*
- chmod -v 0640 /var/log/cherokee.*
-
-If you run Cherokee as root (NOT recommended) this is not
-necessary.
-
-To run Cherokee at startup or using the rc script, add
-'cherokee_enable="YES"' to /etc/rc.conf
-
-To start the Cherokee administrative interface, run (as root)
-
- cherokee-admin
-
-For more information on cherokee-admin(1), please refer to
-the official documentation and manpage.