OpenPKG CVS Repository http://cvs.openpkg.org/ ____________________________________________________________________________
Server: cvs.openpkg.org Name: Ralf S. Engelschall Root: /v/openpkg/cvs Email: r...@openpkg.org Module: openpkg-src Date: 13-Dec-2009 11:05:03 Branch: HEAD Handle: 2009121310050201 Added files: openpkg-src/cherokee cherokee.spec rc.cherokee Log: new package: cherokee 0.99.35 (Cherokee Webserver) Summary: Revision Changes Path 1.1 +179 -0 openpkg-src/cherokee/cherokee.spec 1.1 +60 -0 openpkg-src/cherokee/rc.cherokee ____________________________________________________________________________ patch -p0 <<'@@ .' Index: openpkg-src/cherokee/cherokee.spec ============================================================================ $ cvs diff -u -r0 -r1.1 cherokee.spec --- /dev/null 2009-12-13 11:04:54 +0100 +++ cherokee.spec 2009-12-13 11:05:03 +0100 @@ -0,0 +1,179 @@ +## +## cherokee.spec -- OpenPKG RPM Package Specification +## Copyright (c) 2000-2009 OpenPKG Foundation e.V. <http://openpkg.net/> +## +## Permission to use, copy, modify, and distribute this software for +## any purpose with or without fee is hereby granted, provided that +## the above copyright notice and this permission notice appear in all +## copies. +## +## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED +## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR +## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF +## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT +## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +## SUCH DAMAGE. +## + +# package version +%define V_major 0.99 +%define V_minor 35 + +# package information +Name: cherokee +Summary: Cherokee Webserver +URL: http://www.cherokee.org/ +Vendor: Alvaro Lopez Ortega +Packager: OpenPKG Foundation e.V. +Distribution: OpenPKG Community +Class: EVAL +Group: Web +License: GPL +Version: %{V_major}.%{V_minor} +Release: 20091213 + +# package options +%option with_ssl no +%option with_ldap no +%option with_geoip no +%option with_ffmpeg no + +# list of sources +Source0: http://www.cherokee-project.com/download/%{V_major}/%{version}/cherokee-%{version}.tar.gz +Source1: rc.cherokee + +# build information +Prefix: %{l_prefix} +BuildRoot: %{l_buildroot} +BuildPreReq: OpenPKG, openpkg >= 20060823 +PreReq: OpenPKG, openpkg >= 20060823 +%if "%{with_ssl}" == "yes" +BuildPreReq: openssl +PreReq: openssl +%endif +%if "%{with_ldap}" == "yes" +BuildPreReq: openldap +PreReq: openldap +%endif +%if "%{with_geoip}" == "yes" +BuildPreReq: geoip +PreReq: geoip +%endif +%if "%{with_ffmpeg}" == "yes" +BuildPreReq: ffmpeg +PreReq: ffmpeg +%endif +AutoReq: no +AutoReqProv: no + +%description + Cherokee is a very fast, flexible and easy to configure Web Server. + It supports the widespread technologies nowadays: FastCGI, SCGI, + PHP, CGI, uWSGI, SSI, TLS and SSL encrypted connections, Virtual + hosts, Authentication, on the fly encoding, Load Balancing, Apache + compatible log files, Data Base Balancing, Reverse HTTP Proxy, + Traffic Shaper, Video Streaming and much more. + +%track + prog cherokee = { + version = %{version} + url = http://www.cherokee-project.com/download/%{V_major}/ + regex = (%{V_major}.\d+)/ + } + +%prep + %setup -q + +%build + %{l_shtool} subst \ + -e 's;/cherokee-spawner;%{l_prefix}/var/cherokee/run/cherokee-spawner;g' \ + cherokee/main.c cherokee/spawner.c + CC="%{l_cc}" \ + CFLAGS="%{l_cflags -O}" \ + CPPFLAGS="%{l_cppflags}" \ + LDFLAGS="%{l_ldflags}" \ + ./configure \ + --prefix=%{l_prefix} \ + --mandir=%{l_prefix}/man \ + --datadir=%{l_prefix}/share/cherokee \ + --docdir=%{l_prefix}/share/cherokee/doc \ + --localstatedir=%{l_prefix}/var/cherokee \ + --with-wwwroot=%{l_prefix}/share/cherokee/htdocs \ + --with-wwwuser=%{l_nusr} \ + --with-wwwgroup=%{l_ngrp} \ +%if "%{with_ssl}" == "yes" + --with-libssl=%{l_prefix} \ +%else + --without-libssl \ +%endif +%if "%{with_ldap}" == "yes" + --with-ldap=%{l_prefix} \ +%else + --without-ldap \ +%endif +%if "%{with_geoip}" == "yes" + --with-geoip=%{l_prefix} \ +%else + --without-geoip \ +%endif +%if "%{with_ffmpeg}" == "yes" + --with-ffmpeg=%{l_prefix} \ +%else + --without-ffmpeg \ +%endif + --without-mysql \ + --disable-pam \ + --disable-nls + %{l_make} %{l_mflags -O} + +%install + rm -rf $RPM_BUILD_ROOT + %{l_make} %{l_mflags} install AM_MAKEFLAGS="DESTDIR=$RPM_BUILD_ROOT" + strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true + strip $RPM_BUILD_ROOT%{l_prefix}/sbin/* >/dev/null 2>&1 || true + rm -f $RPM_BUILD_ROOT%{l_prefix}/etc/cherokee/cherokee.conf.perf_sample + %{l_shtool} mkdir -f -p -m 755 \ + $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d + %{l_shtool} install -c -m 755 %{l_value -s -a} \ + %{SOURCE rc.cherokee} $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d/ + %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \ + %{l_files_std} \ + '%config %{l_prefix}/etc/cherokee/*' \ + '%attr(-,%{l_nusr},%{l_ngrp}) %{l_prefix}/var/cherokee/*' \ + '%attr(-,%{l_nusr},%{l_ngrp}) %{l_prefix}/var/cherokee/*/*' \ + '%attr(-,%{l_nusr},%{l_ngrp}) %{l_prefix}/var/cherokee/*/*/*' \ + '%attr(-,%{l_nusr},%{l_ngrp}) %{l_prefix}/var/cherokee/*/*/*/*' + +%files -f files + +%clean + rm -rf $RPM_BUILD_ROOT + +%post + if [ $1 -eq 1 ]; then + ( echo "To configure Cherokee, start the Admin interface via..." + echo "" + echo " \$ $RPM_INSTALL_PREFIX/sbin/cherokee-admin" + echo "" + echo "...and then connect to it via..." + echo "" + echo " http://localhost:9090/ + echo "" + echo "...and use the printed authentication credentials to login." + ) | %{l_rpmtool} msg -b -t notice + fi + exit 0 + +%preun + # before erase, stop service and remove log files + [ $1 -eq 0 ] || exit 0 + %{l_rc} cherokee stop 2>/dev/null + rm -f $RPM_INSTALL_PREFIX/var/cherokee/run/* >/dev/null 2>&1 || true + exit 0 + @@ . patch -p0 <<'@@ .' Index: openpkg-src/cherokee/rc.cherokee ============================================================================ $ cvs diff -u -r0 -r1.1 rc.cherokee --- /dev/null 2009-12-13 11:04:54 +0100 +++ rc.cherokee 2009-12-13 11:05:03 +0100 @@ -0,0 +1,60 @@ +...@l_prefix@/bin/openpkg rc +## +## rc.cherokee -- Run-Commands +## + +%config + cherokee_enable="$openpkg_rc_def" + cherokee_log_files="@l_prefix@/var/cherokee/log/cherokee.access" + cherokee_log_steps="10" + cherokee_log_minsize="10M" + cherokee_log_complevel="9" + cherokee_log_prolog="true" + cherokee_log_epilog="true" + +%common + cherokee_pidfile="@l_prefix@/var/cherokee/run/cherokee.pid" + cherokee_signal () { + [ -f $cherokee_pidfile ] && kill -$1 `cat $cherokee_pidfile` + } + +%status -u @l_susr@ -o + cherokee_usable="no" + cherokee_active="no" + cherokee_usable="unknown" + rcService cherokee enable yes && \ + cherokee_signal 0 && cherokee_active="yes" + echo "cherokee_enable=\"$cherokee_enable\"" + echo "cherokee_usable=\"$cherokee_usable\"" + echo "cherokee_active=\"$cherokee_active\"" + +%start -u @l_susr@ + rcService cherokee enable yes || exit 0 + rcService cherokee active yes && exit 0 + @l_prefix@/sbin/cherokee --detach + +%stop -u @l_susr@ + rcService cherokee enable yes || exit 0 + rcService cherokee active no && exit 0 + cherokee_signal TERM + sleep 2 + +%restart -u @l_susr@ + rcService cherokee enable yes || exit 0 + rcService cherokee active no && exit 0 + rc cherokee stop start + +%reload -u @l_susr@ + rcService cherokee enable yes || exit 0 + rcService cherokee active no && exit 0 + cherokee_signal HUP + +%daily -u @l_susr@ + rcService cherokee enable yes || exit 0 + shtool rotate -f \ + -n ${cherokee_log_steps} -s ${cherokee_log_minsize} -d \ + -z ${cherokee_log_complevel} -o @l_nusr@ -g @l_ngrp@ -m 644 \ + -P "$cherokee_log_prolog" \ + -E "$cherokee_log_epilog" \ + ${cherokee_log_files} + @@ . ______________________________________________________________________ OpenPKG http://openpkg.org CVS Repository Commit List openpkg-cvs@openpkg.org