2003-04-06 02:30:58 +02:00
|
|
|
# New ports collection makefile for: cherokee
|
|
|
|
# Date created: 01 Jun 2002
|
|
|
|
# Whom: silence <oksala@videotron.ca>
|
|
|
|
#
|
|
|
|
# $FreeBSD$
|
|
|
|
#
|
|
|
|
|
2003-04-13 13:05:52 +02:00
|
|
|
PORTNAME= cherokee
|
2008-12-25 20:29:35 +01:00
|
|
|
PORTVERSION= 0.11.6
|
2009-01-07 00:36:04 +01:00
|
|
|
PORTREVISION= 3
|
2003-04-06 02:30:58 +02:00
|
|
|
CATEGORIES= www
|
2008-11-28 15:38:25 +01:00
|
|
|
MASTER_SITES= http://www.cherokee-project.com/download/0.11/${PORTVERSION}/ \
|
2008-08-28 04:29:53 +02:00
|
|
|
LOCAL/beech
|
2003-04-06 02:30:58 +02:00
|
|
|
|
2007-06-15 11:37:13 +02:00
|
|
|
MAINTAINER= beech@FreeBSD.org
|
2007-04-26 17:02:48 +02:00
|
|
|
COMMENT= Extremely fast and flexible web server
|
2004-07-17 20:58:41 +02:00
|
|
|
|
2008-08-28 04:29:53 +02:00
|
|
|
LIB_DEPENDS= pcre.0:${PORTSDIR}/devel/pcre \
|
|
|
|
GeoIP.5:${PORTSDIR}/net/GeoIP
|
2004-07-17 20:58:41 +02:00
|
|
|
|
2008-09-26 22:36:57 +02:00
|
|
|
CONFLICTS= cherokee-devel-[0-9]*
|
2004-07-17 20:58:41 +02:00
|
|
|
USE_GNOME= gnomehack gnometarget pkgconfig
|
2007-04-10 10:23:31 +02:00
|
|
|
USE_LDCONFIG= yes
|
2006-03-20 22:51:35 +01:00
|
|
|
USE_RC_SUBR= cherokee.sh
|
2007-10-17 12:13:01 +02:00
|
|
|
USE_BISON= build
|
2008-08-28 04:29:53 +02:00
|
|
|
USE_PYTHON= 2.4+
|
2006-02-23 11:40:44 +01:00
|
|
|
GNU_CONFIGURE= yes
|
2009-01-03 07:55:58 +01:00
|
|
|
CPPFLAGS= -I${LOCALBASE}/include ${PTHREAD_CFLAGS}
|
2007-04-10 10:23:31 +02:00
|
|
|
LDFLAGS= -L${LOCALBASE}/lib ${PTHREAD_LIBS}
|
2004-07-17 20:58:41 +02:00
|
|
|
CONFIGURE_ENV= CPPFLAGS="${CPPFLAGS}" LDFLAGS="${LDFLAGS}"
|
2007-07-23 11:36:51 +02:00
|
|
|
CONFIGURE_ARGS= --with-wwwroot=${PREFIX}/www/cherokee \
|
2008-08-28 04:29:53 +02:00
|
|
|
--localstatedir=/var \
|
2007-04-26 17:02:48 +02:00
|
|
|
--enable-readdir_r \
|
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
|
2008-08-28 04:29:53 +02:00
|
|
|
MAN1= cget.1 cherokee-config.1 cherokee.1 cherokee-admin.1 \
|
2008-09-26 22:36:57 +02:00
|
|
|
spawn-fcgi.1 cherokee-tweak.1 cherokee-worker.1
|
2008-08-28 04:29:53 +02:00
|
|
|
PORTDOCS= *
|
2004-07-17 20:58:41 +02:00
|
|
|
|
2007-04-26 17:02:48 +02:00
|
|
|
OPTIONS= OPENSSL "TLS/SSL support via openssl" on \
|
|
|
|
GNUTLS "TLS/SSL support via gnutls" off \
|
2009-01-03 07:22:43 +01:00
|
|
|
IPV6 "IPv6 support" on \
|
|
|
|
MYSQL "MySQL Database" off \
|
|
|
|
LDAP "LDAP Support" off
|
2006-11-07 17:54:49 +01:00
|
|
|
|
2007-04-26 17:02:48 +02:00
|
|
|
.include <bsd.port.pre.mk>
|
2003-04-06 02:30:58 +02:00
|
|
|
|
2007-04-26 17:02:48 +02:00
|
|
|
.ifndef WITHOUT_OPENSSL
|
2006-11-07 17:54:49 +01:00
|
|
|
CONFIGURE_ARGS+=--enable-tls=openssl
|
2007-04-26 17:02:48 +02:00
|
|
|
.elifdef WITH_GNUTLS
|
2008-03-03 12:57:08 +01:00
|
|
|
LIB_DEPENDS+= gnutls.26:${PORTSDIR}/security/gnutls
|
2007-04-26 17:02:48 +02:00
|
|
|
CONFIGURE_ARGS+=--enable-tls=gnutls
|
|
|
|
.else
|
2006-11-07 17:54:49 +01:00
|
|
|
CONFIGURE_ARGS+=--disable-tls
|
|
|
|
.endif
|
|
|
|
|
2007-04-26 17:02:48 +02:00
|
|
|
.ifdef WITHOUT_IPV6
|
2006-11-07 17:54:49 +01:00
|
|
|
CONFIGURE_ARGS+=--disable-ipv6
|
|
|
|
.endif
|
2004-09-18 09:42:28 +02:00
|
|
|
|
2009-01-03 07:22:43 +01:00
|
|
|
.ifdef WITH_MYSQL
|
|
|
|
USE_MYSQL= yes
|
|
|
|
CONFIGURE_ARGS+=--with-mysql=yes
|
2009-01-03 07:55:58 +01:00
|
|
|
PLIST_SUB+= MYSQL=""
|
2009-01-03 07:22:43 +01:00
|
|
|
.else
|
|
|
|
CONFIGURE_ARGS+=--with-mysql=no
|
2009-01-03 07:55:58 +01:00
|
|
|
PLIST_SUB+= MYSQL="@comment "
|
2009-01-03 07:22:43 +01:00
|
|
|
.endif
|
|
|
|
|
|
|
|
.ifdef WITH_LDAP
|
|
|
|
USE_OPENLDAP= yes
|
|
|
|
CONFIGURE_ARGS+=--with-ldap=yes
|
2009-01-03 07:55:58 +01:00
|
|
|
PLIST_SUB+= LDAP=""
|
2009-01-03 07:22:43 +01:00
|
|
|
.else
|
|
|
|
CONFIGURE_ARGS+=--with-ldap=no
|
2009-01-03 07:55:58 +01:00
|
|
|
PLIST_SUB+= LDAP="@comment "
|
2009-01-03 07:22:43 +01:00
|
|
|
.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 \
|
|
|
|
's:%sysconfdir%:${PREFIX}/etc:g; \
|
|
|
|
s:%datadir%:${PREFIX}/share:g; \
|
|
|
|
s:%wwwroot%:${PREFIX}/www/cherokee:g; \
|
|
|
|
s:%prefix%:${PREFIX}:g; \
|
2008-08-28 04:29:53 +02:00
|
|
|
s:%localstatedir%:/var:g; \
|
2009-01-10 16:06:47 +01:00
|
|
|
s:#.*User.*nobody:User www:g; \
|
2007-04-26 17:02:48 +02:00
|
|
|
s:#.*Group.*nogroup:Group www:g; \
|
|
|
|
s:#.*PollMethod.*poll:PollMethod kqueue:g' \
|
|
|
|
$$i > $${i%.pre};done
|
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|' \
|
|
|
|
${WRKSRC}/contrib/05to06.py
|
|
|
|
@${REINPLACE_CMD} -e 's|/usr/bin/env python|/usr/local/bin/python|' \
|
|
|
|
${WRKSRC}/contrib/06to07.py
|
|
|
|
@${REINPLACE_CMD} -e 's|/usr/bin/env python|/usr/local/bin/python|' \
|
|
|
|
${WRKSRC}/contrib/07to08.py
|
2008-11-28 15:38:25 +01:00
|
|
|
@${REINPLACE_CMD} -e 's|/usr/bin/env python|/usr/local/bin/python|' \
|
|
|
|
${WRKSRC}/contrib/08to09.py
|
|
|
|
@${REINPLACE_CMD} -e 's|/usr/bin/env python|/usr/local/bin/python|' \
|
|
|
|
${WRKSRC}/contrib/09to010.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
|
|
|
|
2008-08-28 04:29:53 +02:00
|
|
|
.if !defined(NOPORTDOCS)
|
|
|
|
@cd ${WRKSRC}/doc && ${COPYTREE_SHARE} . ${DOCSDIR}
|
|
|
|
.endif
|
|
|
|
|
|
|
|
@cd ${DATADIR}/admin && ${FIND} . -name "*.py" |\
|
|
|
|
${XARGS} ${PYTHON_CMD} ${PYTHON_LIBDIR}/py_compile.py
|
|
|
|
|
2004-09-18 09:42:28 +02:00
|
|
|
.include <bsd.port.post.mk>
|