2012-10-05 18:30:22 +02:00
|
|
|
# Created by: silence <oksala@videotron.ca>
|
2003-04-06 02:30:58 +02:00
|
|
|
# $FreeBSD$
|
|
|
|
|
2003-04-13 13:05:52 +02:00
|
|
|
PORTNAME= cherokee
|
2012-01-04 00:32:55 +01:00
|
|
|
PORTVERSION= 1.2.101
|
2012-12-10 20:11:11 +01:00
|
|
|
PORTREVISION= 4
|
2003-04-06 02:30:58 +02:00
|
|
|
CATEGORIES= www
|
2012-11-21 01:47:52 +01:00
|
|
|
MASTER_SITES= ${MASTER_SITE_SAMBA}
|
|
|
|
MASTER_SITE_SUBDIR=cherokee/1.2/${PORTVERSION}
|
2003-04-06 02:30:58 +02:00
|
|
|
|
2013-09-06 07:22:36 +02:00
|
|
|
MAINTAINER= ports@FreeBSD.org
|
2013-12-11 20:35:22 +01:00
|
|
|
COMMENT= Fast and flexible web server
|
2004-07-17 20:58:41 +02:00
|
|
|
|
2014-02-10 12:17:36 +01:00
|
|
|
BROKEN= No public distfiles
|
|
|
|
|
2013-09-06 07:22:36 +02:00
|
|
|
USES= gettext gmake pathfix pkgconfig
|
2009-07-08 16:12:36 +02:00
|
|
|
USE_OPENSSL= yes
|
2007-04-10 10:23:31 +02:00
|
|
|
USE_LDCONFIG= yes
|
2012-08-06 01:19:36 +02:00
|
|
|
USE_RC_SUBR= cherokee
|
2010-09-15 14:29:48 +02:00
|
|
|
SUB_FILES= pkg-install pkg-message
|
2006-02-23 11:40:44 +01:00
|
|
|
GNU_CONFIGURE= yes
|
2013-02-07 13:37:48 +01:00
|
|
|
CPPFLAGS+= -I${LOCALBASE}/include
|
|
|
|
LDFLAGS+= -L${LOCALBASE}/lib -pthread
|
2010-09-15 14:29:48 +02:00
|
|
|
|
|
|
|
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
|
|
|
|
|
2010-11-18 12:08:18 +01:00
|
|
|
# This should be ok since 1.0.9, cherokee drops privileges
|
|
|
|
# after opening logfiles as a security measure
|
|
|
|
CHEROKEE_LOGFILE_FILEMODE= 0600
|
|
|
|
CHEROKEE_LOGFILE_USER= root
|
|
|
|
CHEROKEE_LOGFILE_GROUP= wheel
|
|
|
|
|
2011-01-27 15:22:25 +01:00
|
|
|
# Directory where to put RRD files, by default
|
|
|
|
CHEROKEE_RRDDIR=/var/lib/cherokee/graphs
|
|
|
|
|
2007-07-23 11:36:51 +02:00
|
|
|
CONFIGURE_ARGS= --with-wwwroot=${PREFIX}/www/cherokee \
|
2010-09-15 14:29:48 +02:00
|
|
|
--localstatedir=${CHEROKEE_VARDIR} \
|
2007-04-10 10:23:31 +02:00
|
|
|
--disable-static
|
2008-08-28 04:29:53 +02:00
|
|
|
DEFCONFS= cherokee.conf
|
2007-04-26 17:02:48 +02:00
|
|
|
CONFSUBDIRS= ssl mods-available mods-enabled sites-available sites-enabled
|
2011-01-27 15:22:25 +01:00
|
|
|
MAN1= cget.1 cherokee-config.1 cherokee.1 cherokee-admin.1 cherokee-admin-launcher.1 \
|
2012-11-21 01:47:52 +01:00
|
|
|
cherokee-tweak.1 cherokee-worker.1
|
2008-08-28 04:29:53 +02:00
|
|
|
PORTDOCS= *
|
2004-07-17 20:58:41 +02:00
|
|
|
|
2012-10-05 18:30:22 +02:00
|
|
|
OPTIONS_DEFINE= IPV6 MYSQL LDAP GEOIP FFMPEG NLS INTPCRE ADMIN ADMIN RRDTOOL UWSGI DOCS
|
2012-11-21 01:47:52 +01:00
|
|
|
OPTIONS_DEFAULT=IPV6 GEOIP ADMIN
|
2012-10-05 18:30:22 +02:00
|
|
|
ADMIN_DESC= Build the Admin Interface
|
|
|
|
INTPCRE_DESC= Use internal PCRE library
|
|
|
|
RRDTOOL_DESC= Usage graphs support
|
|
|
|
UWSGI_DESC= uWSGI support
|
2006-11-07 17:54:49 +01:00
|
|
|
|
2013-09-21 01:36:50 +02:00
|
|
|
NO_STAGE= yes
|
2009-07-08 16:12:36 +02:00
|
|
|
.include <bsd.port.options.mk>
|
2003-04-06 02:30:58 +02:00
|
|
|
|
2012-10-05 18:30:22 +02:00
|
|
|
.if ${PORT_OPTIONS:MADMIN}
|
2014-01-13 22:00:02 +01:00
|
|
|
USE_PYTHON= yes
|
2009-07-08 16:12:36 +02:00
|
|
|
PLIST_SUB+= ADMIN=""
|
2007-04-26 17:02:48 +02:00
|
|
|
.else
|
2009-07-08 16:12:36 +02:00
|
|
|
CONFIGURE_ARGS+=--disable-admin
|
|
|
|
PLIST_SUB+= ADMIN="@comment "
|
2006-11-07 17:54:49 +01:00
|
|
|
.endif
|
|
|
|
|
2012-11-21 01:47:52 +01:00
|
|
|
CONFIGURE_ARGS+=--with-wwwuser=${CHEROKEE_USER} --with-wwwgroup=${CHEROKEE_GROUP}
|
2010-03-15 02:16:48 +01:00
|
|
|
|
2012-10-05 18:30:22 +02:00
|
|
|
.if ${PORT_OPTIONS:MIPV6}
|
2012-11-21 01:47:52 +01:00
|
|
|
CONFIGURE_ARGS+=--disable-ipv6
|
2006-11-07 17:54:49 +01:00
|
|
|
.endif
|
2004-09-18 09:42:28 +02:00
|
|
|
|
2012-10-05 18:30:22 +02:00
|
|
|
.if ${PORT_OPTIONS:MMYSQL}
|
2009-01-03 07:22:43 +01:00
|
|
|
USE_MYSQL= yes
|
2012-11-21 01:47:52 +01:00
|
|
|
CONFIGURE_ARGS+=--with-mysql=yes
|
2009-03-03 10:17:32 +01:00
|
|
|
PLIST_SUB+= MYSQL=""
|
2009-01-03 07:22:43 +01:00
|
|
|
.else
|
2012-11-21 01:47:52 +01:00
|
|
|
CONFIGURE_ARGS+=--with-mysql=no
|
2009-03-03 10:17:32 +01:00
|
|
|
PLIST_SUB+= MYSQL="@comment "
|
2009-01-03 07:22:43 +01:00
|
|
|
.endif
|
|
|
|
|
2012-10-05 18:30:22 +02:00
|
|
|
.if ${PORT_OPTIONS:MLDAP}
|
2009-01-03 07:22:43 +01:00
|
|
|
USE_OPENLDAP= yes
|
2012-11-21 01:47:52 +01:00
|
|
|
CONFIGURE_ARGS+=--with-ldap=yes
|
2009-03-03 10:17:32 +01:00
|
|
|
PLIST_SUB+= LDAP=""
|
2009-01-03 07:22:43 +01:00
|
|
|
.else
|
2012-11-21 01:47:52 +01:00
|
|
|
CONFIGURE_ARGS+=--with-ldap=no
|
2009-03-03 10:17:32 +01:00
|
|
|
PLIST_SUB+= LDAP="@comment "
|
2009-01-03 07:22:43 +01:00
|
|
|
.endif
|
|
|
|
|
2012-10-05 18:30:22 +02:00
|
|
|
.if ${PORT_OPTIONS:MGEOIP}
|
2014-01-09 20:53:48 +01:00
|
|
|
LIB_DEPENDS+= libGeoIP.so:${PORTSDIR}/net/GeoIP
|
2012-11-21 01:47:52 +01:00
|
|
|
CONFIGURE_ARGS+=--with-geoip=yes
|
2009-07-08 16:12:36 +02:00
|
|
|
PLIST_SUB+= GEOIP=""
|
|
|
|
.else
|
2012-11-21 01:47:52 +01:00
|
|
|
CONFIGURE_ARGS+=--with-geoip=no
|
2009-07-08 16:12:36 +02:00
|
|
|
PLIST_SUB+= GEOIP="@comment "
|
|
|
|
.endif
|
|
|
|
|
2012-10-05 18:30:22 +02:00
|
|
|
.if ${PORT_OPTIONS:MFFMPEG}
|
2014-01-09 20:53:48 +01:00
|
|
|
LIB_DEPENDS+= libavformat.so:${PORTSDIR}/multimedia/ffmpeg \
|
|
|
|
libavcodec.so:${PORTSDIR}/multimedia/ffmpeg \
|
|
|
|
libavutil.so:${PORTSDIR}/multimedia/ffmpeg
|
2012-11-21 01:47:52 +01:00
|
|
|
CONFIGURE_ARGS+=--with-ffmpeg=yes
|
2009-07-08 16:12:36 +02:00
|
|
|
.else
|
2012-11-21 01:47:52 +01:00
|
|
|
CONFIGURE_ARGS+=--with-ffmpeg=no
|
2009-07-08 16:12:36 +02:00
|
|
|
.endif
|
|
|
|
|
2012-10-05 18:30:22 +02:00
|
|
|
.if ${PORT_OPTIONS:MNLS}
|
2009-07-08 16:12:36 +02:00
|
|
|
PLIST_SUB+= NLS=""
|
|
|
|
.else
|
2012-11-21 01:47:52 +01:00
|
|
|
CONFIGURE_ARGS+=--disable-nls
|
2009-07-08 16:12:36 +02:00
|
|
|
PLIST_SUB+= NLS="@comment "
|
|
|
|
.endif
|
|
|
|
|
2012-10-05 18:30:22 +02:00
|
|
|
.if ${PORT_OPTIONS:MINTPCRE}
|
2012-11-21 01:47:52 +01:00
|
|
|
CONFIGURE_ARGS+=--enable-internal-pcre
|
2009-07-08 16:12:36 +02:00
|
|
|
.else
|
2014-01-09 20:53:48 +01:00
|
|
|
LIB_DEPENDS+= libpcre.so:${PORTSDIR}/devel/pcre
|
2009-07-08 16:12:36 +02:00
|
|
|
.endif
|
|
|
|
|
2012-10-05 18:30:22 +02:00
|
|
|
.if ${PORT_OPTIONS:MRRDTOOL}
|
2010-05-19 08:36:18 +02:00
|
|
|
RUN_DEPENDS+= rrdtool:${PORTSDIR}/databases/rrdtool
|
|
|
|
.endif
|
|
|
|
|
2012-10-05 18:30:22 +02:00
|
|
|
.if ${PORT_OPTIONS:MUWSGI}
|
2010-06-09 05:45:15 +02:00
|
|
|
RUN_DEPENDS+= uwsgi:${PORTSDIR}/www/uwsgi
|
|
|
|
.endif
|
|
|
|
|
2005-09-01 02:17:59 +02:00
|
|
|
post-patch:
|
2007-04-26 17:02:48 +02:00
|
|
|
@${FIND} ${WRKSRC} -name Makefile.in | ${XARGS} \
|
|
|
|
${REINPLACE_CMD} -e 's|@mkdir_p@|${MKDIR} --|g'
|
|
|
|
@${REINPLACE_CMD} -e '/cherokee_replace.*%sysconfdir%/d;/^SUBDIRS/s|doc ||;\
|
2008-03-25 10:03:55 +01:00
|
|
|
/^install-data-am/s|install-data-local|install-data-local-config|;\
|
|
|
|
/^SUBDIRS/s|windows||'\
|
2007-04-26 17:02:48 +02:00
|
|
|
${WRKSRC}/Makefile.in
|
|
|
|
@for i in ${BUILD_WRKSRC}/*.sample.pre;do ${SED} -e \
|
2009-07-08 16:12:36 +02:00
|
|
|
's:%wwwroot%:${PREFIX}/www/cherokee:g; \
|
2007-04-26 17:02:48 +02:00
|
|
|
s:%prefix%:${PREFIX}:g; \
|
2009-07-08 16:12:36 +02:00
|
|
|
s:%localstatedir%:/var:g' \
|
2007-04-26 17:02:48 +02:00
|
|
|
$$i > $${i%.pre};done
|
2010-11-18 12:08:18 +01:00
|
|
|
|
2011-01-06 01:54:06 +01:00
|
|
|
@${REINPLACE_CMD} -e 's|/usr/bin/env python|/usr/local/bin/python|' \
|
|
|
|
${WRKSRC}/admin/CTK/CTK-run.pre
|
|
|
|
@${REINPLACE_CMD} -e 's|/usr/bin/env python|/usr/local/bin/python|' \
|
|
|
|
${WRKSRC}/cherokee/cherokee-admin-launcher
|
2008-08-28 04:29:53 +02:00
|
|
|
@${REINPLACE_CMD} -e 's|/usr/bin/env python|/usr/local/bin/python|' \
|
|
|
|
${WRKSRC}/admin/server.py
|
|
|
|
@${REINPLACE_CMD} -e 's|/usr/bin/env python|/usr/local/bin/python|' \
|
2010-11-18 12:08:18 +01:00
|
|
|
${WRKSRC}/admin/upgrade_config.py
|
2008-08-28 04:29:53 +02:00
|
|
|
@${REINPLACE_CMD} -e 's|/usr/bin/env python|/usr/local/bin/python|' \
|
2010-11-18 12:08:18 +01:00
|
|
|
${WRKSRC}/cherokee/cherokee-tweak
|
2008-11-28 15:38:25 +01:00
|
|
|
@${REINPLACE_CMD} -e 's|/usr/bin/env python|/usr/local/bin/python|' \
|
2010-11-18 12:08:18 +01:00
|
|
|
${WRKSRC}/doc/cookbook_dbslayer.html
|
2009-03-03 10:17:32 +01:00
|
|
|
@${REINPLACE_CMD} -e 's|/usr/bin/env python|/usr/local/bin/python|' \
|
2010-11-18 12:08:18 +01:00
|
|
|
${WRKSRC}/doc/test_images.py
|
2009-03-03 10:17:32 +01:00
|
|
|
@${REINPLACE_CMD} -e 's|/usr/bin/env python|/usr/local/bin/python|' \
|
2010-11-18 12:08:18 +01:00
|
|
|
${WRKSRC}/contrib/tracelor.py
|
2009-07-08 16:12:36 +02:00
|
|
|
@${REINPLACE_CMD} -e 's|/usr/bin/env python|/usr/local/bin/python|' \
|
2010-11-18 12:08:18 +01:00
|
|
|
${WRKSRC}/po/po_stats.py
|
2008-08-28 04:29:53 +02:00
|
|
|
@${REINPLACE_CMD} -e 's|/usr/bin/env python|/usr/local/bin/python|' \
|
|
|
|
${WRKSRC}/qa/fcgi.py
|
|
|
|
@${REINPLACE_CMD} -e 's|/usr/bin/env python|/usr/local/bin/python|' \
|
|
|
|
${WRKSRC}/qa/run-tests.py
|
2005-04-23 13:48:02 +02:00
|
|
|
|
2003-04-13 13:05:52 +02:00
|
|
|
post-install:
|
2007-04-26 17:02:48 +02:00
|
|
|
@${INSTALL} -d ${CONFSUBDIRS:S|^|${PREFIX}/etc/cherokee/|}
|
|
|
|
@for i in ${DEFCONFS};do\
|
|
|
|
${INSTALL_DATA} ${WRKSRC}/$$i.sample ${PREFIX}/etc/cherokee/$$i.default;done
|
2008-03-25 10:03:55 +01:00
|
|
|
@${INSTALL_DATA} ${WRKSRC}/performance.conf.sample ${PREFIX}/etc/cherokee/cherokee.conf.perf_sample
|
2007-04-26 17:02:48 +02:00
|
|
|
@:>${PREFIX}/etc/cherokee/mods-enabled/.empty
|
2008-03-25 10:03:55 +01:00
|
|
|
@:>${PREFIX}/etc/cherokee/sites-available/.empty
|
|
|
|
@:>${PREFIX}/etc/cherokee/sites-enabled/.empty
|
2007-04-26 17:02:48 +02:00
|
|
|
@:>${PREFIX}/etc/cherokee/ssl/.empty
|
|
|
|
@for i in `${FIND} ${PREFIX}/etc/cherokee/ -name \*.default`;do\
|
|
|
|
if [ ! -f $${i%.default} ];then ${CP} $$i $${i%.default};fi;done
|
|
|
|
@for i in `${FIND} ${PREFIX}/etc/cherokee/ -name \*.sample`;do\
|
|
|
|
if [ ! -f $${i%.sample} ];then ${CP} $$i $${i%.sample};fi;done
|
2003-04-06 02:30:58 +02:00
|
|
|
|
2012-10-05 18:30:22 +02:00
|
|
|
.if ${PORT_OPTIONS:MDOCS}
|
2008-08-28 04:29:53 +02:00
|
|
|
@cd ${WRKSRC}/doc && ${COPYTREE_SHARE} . ${DOCSDIR}
|
|
|
|
.endif
|
|
|
|
|
2012-10-05 18:30:22 +02:00
|
|
|
.if ${PORT_OPTIONS:MADMIN}
|
2008-08-28 04:29:53 +02:00
|
|
|
@cd ${DATADIR}/admin && ${FIND} . -name "*.py" |\
|
|
|
|
${XARGS} ${PYTHON_CMD} ${PYTHON_LIBDIR}/py_compile.py
|
2009-07-08 16:12:36 +02:00
|
|
|
.endif
|
2008-08-28 04:29:53 +02:00
|
|
|
|
2010-09-15 14:29:48 +02:00
|
|
|
@${SETENV} \
|
2010-11-18 12:08:18 +01:00
|
|
|
CHEROKEE_LOGFILE_FILEMODE=${CHEROKEE_LOGFILE_FILEMODE} \
|
|
|
|
CHEROKEE_LOGFILE_USER=${CHEROKEE_LOGFILE_USER} \
|
|
|
|
CHEROKEE_LOGFILE_GROUP=${CHEROKEE_LOGFILE_GROUP} \
|
2010-09-15 14:29:48 +02:00
|
|
|
CHEROKEE_ERRORLOG=${CHEROKEE_ERRORLOG} \
|
|
|
|
CHEROKEE_ACCESSLOG=${CHEROKEE_ACCESSLOG} \
|
2011-01-27 15:22:25 +01:00
|
|
|
CHEROKEE_WITH_RRDTOOL=${WITH_RRDTOOL} \
|
|
|
|
CHEROKEE_RRDDIR=${CHEROKEE_RRDDIR} \
|
|
|
|
CHEROKEE_RRDDIR_USER=${CHEROKEE_USER} \
|
|
|
|
CHEROKEE_RRDDIR_GROUP=${CHEROKEE_GROUP} \
|
2010-09-15 14:29:48 +02:00
|
|
|
${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
|
|
|
|
|
2010-03-15 02:16:48 +01:00
|
|
|
@${ECHO_MSG} "==============================================================="
|
|
|
|
@${CAT} ${PKGMESSAGE}
|
|
|
|
@${ECHO_MSG} "==============================================================="
|
|
|
|
|
2012-10-05 18:30:22 +02:00
|
|
|
.include <bsd.port.mk>
|