mirror of
https://git.FreeBSD.org/ports.git
synced 2025-01-04 06:15:24 +00:00
- Remove checkconfig function from rc.d script
- Move www root into www/cherokee - Configure thread-enabled readdir - Simplify options - Fix require in rc.d script - Protect user-tunable files - Default user and group to www - Minor tweaks - Bump portrevision PR: ports/112103 [1], ports/111611 [2] (based on) Submitted by: Beech Rintoul <beech@alaskaparadise.com> (maintainer) [1], mnag [2]
This commit is contained in:
parent
8eb148fbc6
commit
b5ee456244
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=190924
@ -7,13 +7,13 @@
|
||||
|
||||
PORTNAME= cherokee
|
||||
PORTVERSION= 0.5.6
|
||||
PORTREVISION= 3
|
||||
PORTREVISION= 4
|
||||
CATEGORIES= www
|
||||
MASTER_SITES= http://www.cherokee-project.com/download/${PORTVERSION:R}/${PORTVERSION}/ \
|
||||
CENKES http://www.alaskaparadise.com/freebsd/
|
||||
|
||||
MAINTAINER= beech@alaskaparadise.com
|
||||
COMMENT= An extremely fast and flexible web server
|
||||
COMMENT= Extremely fast and flexible web server
|
||||
|
||||
LIB_DEPENDS= pcre.0:${PORTSDIR}/devel/pcre
|
||||
|
||||
@ -23,68 +23,75 @@ USE_LDCONFIG= yes
|
||||
USE_RC_SUBR= cherokee.sh
|
||||
USE_GCC= 3.4+
|
||||
USE_BISON= yes
|
||||
USE_GETOPT_LONG= yes
|
||||
USE_GMAKE= yes
|
||||
GNU_CONFIGURE= yes
|
||||
CPPFLAGS= -I${LOCALBASE}/include ${PTHREAD_CFLAGS}
|
||||
LDFLAGS= -L${LOCALBASE}/lib ${PTHREAD_LIBS}
|
||||
CONFIGURE_ENV= CPPFLAGS="${CPPFLAGS}" LDFLAGS="${LDFLAGS}"
|
||||
CONFIGURE_ARGS= --mandir=${MANPREFIX}/man \
|
||||
--with-wwwroot=${PREFIX}/www \
|
||||
--with-wwwroot=${PREFIX}/www/cherokee \
|
||||
--enable-readdir_r \
|
||||
--disable-static
|
||||
|
||||
OPTIONS= GNUTLS "TLS/SSL Use gnutls" on \
|
||||
OPENSSL "TLS/SSL Use openssl" off \
|
||||
NOTLS "No TLS/SSL" off \
|
||||
NOIPV6 "No IPv6" off
|
||||
|
||||
DEFCONFS= advanced.conf cherokee.conf icons.conf mime.compression.types mime.types
|
||||
CONFSUBDIRS= ssl mods-available mods-enabled sites-available sites-enabled
|
||||
MAN1= cget.1 cherokee-config.1 cherokee.1 cherokee_logrotate.1
|
||||
|
||||
OPTIONS= OPENSSL "TLS/SSL support via openssl" on \
|
||||
GNUTLS "TLS/SSL support via gnutls" off \
|
||||
IPV6 "IPv6 support" on
|
||||
|
||||
.include <bsd.port.pre.mk>
|
||||
|
||||
.if !defined(WITHOUT_GNUTLS)
|
||||
LIB_DEPENDS+= gnutls.15:${PORTSDIR}/security/gnutls
|
||||
CONFIGURE_ARGS+= --enable-tls=gnutls
|
||||
.endif
|
||||
|
||||
.if defined(WITH_OPENSSL)
|
||||
CFLAGS+= -DHAVE_OPENSSL
|
||||
.ifndef WITHOUT_OPENSSL
|
||||
CONFIGURE_ARGS+=--enable-tls=openssl
|
||||
LDFLAGS+= -lssl -lcrypto
|
||||
.endif
|
||||
|
||||
.if defined(WITH_NOTLS)
|
||||
.elifdef WITH_GNUTLS
|
||||
LIB_DEPENDS+= gnutls.15:${PORTSDIR}/security/gnutls
|
||||
CONFIGURE_ARGS+=--enable-tls=gnutls
|
||||
.else
|
||||
CONFIGURE_ARGS+=--disable-tls
|
||||
.endif
|
||||
|
||||
.if defined(WITH_NOIPV6)
|
||||
.ifdef WITHOUT_IPV6
|
||||
CONFIGURE_ARGS+=--disable-ipv6
|
||||
.endif
|
||||
|
||||
post-patch:
|
||||
@${FIND} ${WRKSRC} -name "Makefile.in" | ${XARGS} ${REINPLACE_CMD} -e \
|
||||
's|@mkdir_p@|${MKDIR} --|g'
|
||||
|
||||
pre-build:
|
||||
.for file in advanced.conf cherokee.conf mods-ssl sites-default sites-example
|
||||
@cd ${BUILD_WRKSRC} && ${SED} -e \
|
||||
's:%sysconfdir%:${PREFIX}/etc:g ; \
|
||||
s:%datadir%:${PREFIX}/share:g ; \
|
||||
s:%wwwroot%:${PREFIX}/www:g ; \
|
||||
s:%prefix%:${PREFIX}:g' < ${file}.sample.pre > ${file}.sample
|
||||
.endfor
|
||||
@${FIND} ${WRKSRC} -name Makefile.in | ${XARGS} \
|
||||
${REINPLACE_CMD} -e 's|@mkdir_p@|${MKDIR} --|g'
|
||||
@${REINPLACE_CMD} -e '/cherokee_replace.*%sysconfdir%/d;/^SUBDIRS/s|doc ||;\
|
||||
/^install-data-am/s|install-data-local|install-data-local-config|'\
|
||||
${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; \
|
||||
s:#.*User.*nobody:User www:g; \
|
||||
s:#.*Group.*nogroup:Group www:g; \
|
||||
s:#.*PollMethod.*poll:PollMethod kqueue:g' \
|
||||
$$i > $${i%.pre};done
|
||||
|
||||
post-install:
|
||||
@${INSTALL} -d ${CONFSUBDIRS:S|^|${PREFIX}/etc/cherokee/|}
|
||||
@for i in ${DEFCONFS};do\
|
||||
${INSTALL_DATA} ${WRKSRC}/$$i.sample ${PREFIX}/etc/cherokee/$$i.default;done
|
||||
@for i in ${WRKSRC}/mods-*.sample;do\
|
||||
${INSTALL_DATA} $$i ${PREFIX}/etc/cherokee/mods-available/$${i#*mods-};done
|
||||
@for i in ${WRKSRC}/sites-*.sample;do\
|
||||
${INSTALL_DATA} $$i ${PREFIX}/etc/cherokee/sites-available/$${i#*sites-};done
|
||||
@:>${PREFIX}/etc/cherokee/mods-enabled/.empty
|
||||
@:>${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
|
||||
@if [ -z "`${LS} ${PREFIX}/etc/cherokee/sites-enabled/`" ];then\
|
||||
${LN} -sf ../sites-available/default ${PREFIX}/etc/cherokee/sites-enabled/;fi
|
||||
.if !defined(NOPORTDOCS)
|
||||
@${INSTALL} -d ${DOCSDIR}/
|
||||
${INSTALL_DATA} ${WRKSRC}/doc/*.html ${DOCSDIR}/
|
||||
${INSTALL_DATA} ${WRKSRC}/doc/*.png ${DOCSDIR}/
|
||||
${INSTALL_DATA} ${WRKSRC}/doc/images/*.png ${DOCSDIR}/
|
||||
@${INSTALL} -d ${DOCSDIR}/images/
|
||||
@${INSTALL_DATA} ${WRKSRC}/doc/*.html ${DOCSDIR}/
|
||||
@${INSTALL_DATA} ${WRKSRC}/doc/*.png ${DOCSDIR}/
|
||||
@${INSTALL_DATA} ${WRKSRC}/doc/images/*.png ${DOCSDIR}/images/
|
||||
@${INSTALL_DATA} ${WRKSRC}/doc/develop/Intro.txt ${DOCSDIR}/
|
||||
.endif
|
||||
${INSTALL_DATA} ${WRKSRC}/doc/develop/Intro.txt ${DATADIR}/
|
||||
@${ECHO_MSG} " "
|
||||
@${ECHO_MSG} " Dont forget to read the doc "
|
||||
@${ECHO_MSG} " ${PREFIX}/share/cherokee/Intro.txt"
|
||||
@${ECHO_MSG} " "
|
||||
|
||||
.include <bsd.port.post.mk>
|
||||
|
@ -3,7 +3,7 @@
|
||||
# $FreeBSD$
|
||||
#
|
||||
# PROVIDE: cherokee
|
||||
# REQUIRE: %%REQUIRE%%
|
||||
# REQUIRE: DAEMON
|
||||
# KEYWORD: shutdown
|
||||
#
|
||||
# Add the following lines to /etc/rc.conf to enable cherokee:
|
||||
@ -29,13 +29,6 @@ command_args="-C ${cherokee_conf} -b"
|
||||
pidfile=/var/run/cherokee.pid
|
||||
required_files=${cherokee_conf}
|
||||
stop_postcmd=stop_postcmd
|
||||
restart_precmd="checkconfig"
|
||||
|
||||
checkconfig()
|
||||
{
|
||||
echo "Performing sanity check on ${name} configuration:"
|
||||
eval "${command} ${command_args} -t"
|
||||
}
|
||||
|
||||
stop_postcmd()
|
||||
{
|
||||
|
@ -1,30 +0,0 @@
|
||||
--- Makefile.in.orig Tue Apr 4 17:23:41 2006
|
||||
+++ Makefile.in Tue Apr 11 02:25:14 2006
|
||||
@@ -314,7 +314,7 @@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
sysconfdir = @sysconfdir@
|
||||
target_alias = @target_alias@
|
||||
-SUBDIRS = m4 contrib www doc icons qa cherokee cget windows
|
||||
+SUBDIRS = m4 contrib www icons qa cherokee cget windows
|
||||
bin_SCRIPTS = cherokee-config
|
||||
SUFFIXES = .sample.pre .sample
|
||||
|
||||
@@ -979,7 +979,7 @@
|
||||
|
||||
|
||||
.sample.pre.sample:
|
||||
- $(top_builddir)/cherokee_replace $< $@ "%sysconfdir%" "${sysconfdir}" "%datadir%" "${datadir}" "%prefix%" "${prefix}" "%wwwroot%" "${WWW_ROOT}"
|
||||
+ true $< $@ "%sysconfdir%" "${sysconfdir}" "%datadir%" "${datadir}" "%prefix%" "${prefix}" "%wwwroot%" "${WWW_ROOT}"
|
||||
|
||||
install-data-local-config:
|
||||
@$(mkinstalldirs) $(DESTDIR)$(pkgincludedir);
|
||||
@@ -1022,9 +1022,6 @@
|
||||
echo "$@ will not overwrite existing $(cherokeeconfdir)/mime.compression.types"; \
|
||||
else \
|
||||
$(INSTALL_DATA) $(top_srcdir)/mime.compression.types.sample $(DESTDIR)$(cherokeeconfdir)/mime.compression.types; \
|
||||
- fi
|
||||
- @if test -d $(DESTDIR)$(sysconfdir)/pam.d && test ! -d $(DESTDIR)$(sysconfdir)/pam.d/cherokee ; then \
|
||||
- $(INSTALL_DATA) $(top_srcdir)/pam.d_cherokee $(DESTDIR)$(sysconfdir)/pam.d/cherokee; \
|
||||
fi
|
||||
@if test -f $(DESTDIR)$(cherokeeconfdir)/sites-available/default ; then \
|
||||
echo "$@ will not overwrite existing $(cherokeeconfdir)/sites-available/default"; \
|
@ -2,16 +2,24 @@ bin/cget
|
||||
bin/cherokee-config
|
||||
bin/cherokee-panic
|
||||
bin/cherokee_logrotate
|
||||
etc/cherokee/advanced.conf
|
||||
etc/cherokee/cherokee.conf
|
||||
etc/cherokee/icons.conf
|
||||
etc/cherokee/mime.compression.types
|
||||
etc/cherokee/mime.types
|
||||
etc/cherokee/mods-available/admin
|
||||
etc/cherokee/mods-available/ssl
|
||||
etc/cherokee/sites-available/default
|
||||
etc/cherokee/sites-available/example.com
|
||||
etc/cherokee/sites-enabled/default
|
||||
@unexec for i in `find %D/etc/cherokee -name \*.default`;do if cmp -s $i ${i%%.default};then rm -f ${i%%.default};fi;done
|
||||
@unexec for i in `find %D/etc/cherokee -name \*.sample`;do if cmp -s $i ${i%%.sample};then rm -f ${i%%.sample};fi;done
|
||||
@unexec cd %D/etc/cherokee/sites-enabled/&&if [ -L default -a -z "`ls|grep -vx default`" ];then rm -f default;fi
|
||||
etc/cherokee/advanced.conf.default
|
||||
etc/cherokee/cherokee.conf.default
|
||||
etc/cherokee/icons.conf.default
|
||||
etc/cherokee/mime.compression.types.default
|
||||
etc/cherokee/mime.types.default
|
||||
etc/cherokee/mods-available/admin.sample
|
||||
etc/cherokee/mods-available/ssl.sample
|
||||
etc/cherokee/mods-enabled/.empty
|
||||
etc/cherokee/sites-available/default.sample
|
||||
etc/cherokee/sites-available/example.sample
|
||||
etc/cherokee/ssl/.empty
|
||||
@exec for i in `find %D/etc/cherokee -name \*.default`;do if [ ! -f ${i%%.default} ];then cp $i ${i%%.default};fi;done
|
||||
@exec for i in `find %D/etc/cherokee -name \*.sample`;do if [ ! -f ${i%%.sample} ];then cp $i ${i%%.sample};fi;done
|
||||
@exec if [ ! -d %D/etc/cherokee/sites-enabled ];then mkdir %D/etc/cherokee/sites-enabled;fi
|
||||
@exec cd %D/etc/cherokee/sites-enabled/&&if [ -z "`ls`" ];then ln -sf ../sites-available/default;fi
|
||||
include/cherokee/admin_client.h
|
||||
include/cherokee/buffer.h
|
||||
include/cherokee/cherokee-config.h
|
||||
@ -95,7 +103,6 @@ lib/libcherokee-server.so.0
|
||||
libdata/pkgconfig/cherokee.pc
|
||||
sbin/cherokee
|
||||
share/aclocal/cherokee.m4
|
||||
%%DATADIR%%/Intro.txt
|
||||
%%DATADIR%%/deps/combined.deps
|
||||
%%DATADIR%%/deps/common.deps
|
||||
%%DATADIR%%/deps/error_redir.deps
|
||||
@ -125,7 +132,6 @@ share/aclocal/cherokee.m4
|
||||
%%PORTDOCS%%%%DOCSDIR%%/Behavior_configuration.html
|
||||
%%PORTDOCS%%%%DOCSDIR%%/CGI_executing.html
|
||||
%%PORTDOCS%%%%DOCSDIR%%/Cget.html
|
||||
%%PORTDOCS%%%%DOCSDIR%%/Cherokee-icono.png
|
||||
%%PORTDOCS%%%%DOCSDIR%%/Combined_logger.html
|
||||
%%PORTDOCS%%%%DOCSDIR%%/Combined_logs.html
|
||||
%%PORTDOCS%%%%DOCSDIR%%/Common_behavior.html
|
||||
@ -137,7 +143,6 @@ share/aclocal/cherokee.m4
|
||||
%%PORTDOCS%%%%DOCSDIR%%/Directory_configuration.html
|
||||
%%PORTDOCS%%%%DOCSDIR%%/Directory_listing.html
|
||||
%%PORTDOCS%%%%DOCSDIR%%/Encoders.html
|
||||
%%PORTDOCS%%%%DOCSDIR%%/Exquisite-khelpcenter.png
|
||||
%%PORTDOCS%%%%DOCSDIR%%/Extension_configuration.html
|
||||
%%PORTDOCS%%%%DOCSDIR%%/FastCGI.html
|
||||
%%PORTDOCS%%%%DOCSDIR%%/File_sending.html
|
||||
@ -148,6 +153,7 @@ share/aclocal/cherokee.m4
|
||||
%%PORTDOCS%%%%DOCSDIR%%/Htdigest_validator.html
|
||||
%%PORTDOCS%%%%DOCSDIR%%/Htpasswd_validator.html
|
||||
%%PORTDOCS%%%%DOCSDIR%%/Icons_configuration.html
|
||||
%%PORTDOCS%%%%DOCSDIR%%/Intro.txt
|
||||
%%PORTDOCS%%%%DOCSDIR%%/Jaws_and_Cherokee_with_FastCGI.html
|
||||
%%PORTDOCS%%%%DOCSDIR%%/Logging_system.html
|
||||
%%PORTDOCS%%%%DOCSDIR%%/Mime_types_configuration.html
|
||||
@ -160,7 +166,6 @@ share/aclocal/cherokee.m4
|
||||
%%PORTDOCS%%%%DOCSDIR%%/Request_configuration.html
|
||||
%%PORTDOCS%%%%DOCSDIR%%/Ruby_on_Rails_with_SCGI.html
|
||||
%%PORTDOCS%%%%DOCSDIR%%/SCGI.html
|
||||
%%PORTDOCS%%%%DOCSDIR%%/Server-conf-small.png
|
||||
%%PORTDOCS%%%%DOCSDIR%%/Server_configuration.html
|
||||
%%PORTDOCS%%%%DOCSDIR%%/U-Cherokee.html
|
||||
%%PORTDOCS%%%%DOCSDIR%%/Validators.html
|
||||
@ -169,20 +174,25 @@ share/aclocal/cherokee.m4
|
||||
%%PORTDOCS%%%%DOCSDIR%%/WebApplications.html
|
||||
%%PORTDOCS%%%%DOCSDIR%%/cherokee.png
|
||||
%%PORTDOCS%%%%DOCSDIR%%/index.html
|
||||
www/images/cherokee-logo.png
|
||||
www/images/default-bg.png
|
||||
www/images/powered_by_cherokee.png
|
||||
www/index.html
|
||||
%%PORTDOCS%%%%DOCSDIR%%/images/Cherokee-icono.png
|
||||
%%PORTDOCS%%%%DOCSDIR%%/images/Exquisite-khelpcenter.png
|
||||
%%PORTDOCS%%%%DOCSDIR%%/images/Server-conf-small.png
|
||||
www/cherokee/images/cherokee-logo.png
|
||||
www/cherokee/images/default-bg.png
|
||||
www/cherokee/images/powered_by_cherokee.png
|
||||
www/cherokee/index.html
|
||||
%%PORTDOCS%%@dirrm %%DOCSDIR%%/images
|
||||
%%PORTDOCS%%@dirrm %%DOCSDIR%%
|
||||
@dirrm %%DATADIR%%/icons
|
||||
@dirrm %%DATADIR%%/deps
|
||||
@dirrm %%DATADIR%%
|
||||
@dirrm lib/cherokee
|
||||
@dirrm include/cherokee
|
||||
@dirrm etc/cherokee/ssl
|
||||
@dirrm etc/cherokee/sites-enabled
|
||||
@dirrm etc/cherokee/sites-available
|
||||
@dirrm etc/cherokee/mods-enabled
|
||||
@dirrm etc/cherokee/mods-available
|
||||
@dirrm etc/cherokee
|
||||
@dirrmtry www/images
|
||||
@dirrmtry etc/cherokee/ssl
|
||||
@dirrmtry etc/cherokee/sites-enabled
|
||||
@dirrmtry etc/cherokee/sites-available
|
||||
@dirrmtry etc/cherokee/mods-enabled
|
||||
@dirrmtry etc/cherokee/mods-available
|
||||
@dirrmtry etc/cherokee
|
||||
@dirrmtry www/cherokee/images
|
||||
@dirrmtry www/cherokee
|
||||
|
Loading…
Reference in New Issue
Block a user