OpenPKG CVS Repository
http://cvs.openpkg.org/
____________________________________________________________________________
Server: cvs.openpkg.org Name: Ralf S. Engelschall
Root: /e/openpkg/cvs Email: [EMAIL PROTECTED]
Module: openpkg-src Date: 14-Feb-2004 14:47:57
Branch: HEAD Handle: 2004021413475600
Added files:
openpkg-src/twiki rc.twiki twiki-apache.conf twiki.spec
Log:
new package: twiki 20040119 (Wiki Wiki based Collaboration Platform)
Summary:
Revision Changes Path
1.1 +19 -0 openpkg-src/twiki/rc.twiki
1.1 +26 -0 openpkg-src/twiki/twiki-apache.conf
1.1 +181 -0 openpkg-src/twiki/twiki.spec
____________________________________________________________________________
patch -p0 <<'@@ .'
Index: openpkg-src/twiki/rc.twiki
============================================================================
$ cvs diff -u -r0 -r1.1 rc.twiki
--- /dev/null 2004-02-14 14:47:56.000000000 +0100
+++ rc.twiki 2004-02-14 14:47:56.000000000 +0100
@@ -0,0 +1,19 @@
[EMAIL PROTECTED]@/lib/openpkg/bash @l_prefix@/etc/rc
+##
+## rc.twiki -- Run-Commands
+##
+
+%config
+ twiki_enable="$openpkg_rc_def"
+
+%status -u @l_susr@ -o
+ twiki_usable="no"
+ twiki_active="no"
+ echo "twiki_enable=\"$twiki_enable\""
+ echo "twiki_usable=\"$twiki_usable\""
+ echo "twiki_active=\"$twiki_active\""
+
+%hourly -u @l_nusr@
+ rcService twiki enable yes || exit 0
+ cd @l_prefix@/libexec/twiki && ./mailnotify -q
+
@@ .
patch -p0 <<'@@ .'
Index: openpkg-src/twiki/twiki-apache.conf
============================================================================
$ cvs diff -u -r0 -r1.1 twiki-apache.conf
--- /dev/null 2004-02-14 14:47:56.000000000 +0100
+++ twiki-apache.conf 2004-02-14 14:47:57.000000000 +0100
@@ -0,0 +1,26 @@
+##
+## twiki.conf -- Apache Configuration for TWiki
+##
+
+RewriteEngine on
+RewriteRule ^/twiki/?$ /twiki/bin/view/Main/WebHome [R,L]
+
+ScriptAlias /twiki/bin/ "@l_prefix@/libexec/twiki/"
+Alias /twiki/ "@l_prefix@/share/twiki/"
+
+<Directory "@l_prefix@/libexec/twiki">
+ Options +ExecCGI
+ SetHandler cgi-script
+ Allow from all
+</Directory>
+
+<Directory "@l_prefix@/share/twiki/pub">
+ Options FollowSymLinks +Includes
+ AllowOverride None
+ Allow from all
+</Directory>
+
+<Directory "@l_prefix@/share/twiki/templates">
+ deny from all
+</Directory>
+
@@ .
patch -p0 <<'@@ .'
Index: openpkg-src/twiki/twiki.spec
============================================================================
$ cvs diff -u -r0 -r1.1 twiki.spec
--- /dev/null 2004-02-14 14:47:56.000000000 +0100
+++ twiki.spec 2004-02-14 14:47:57.000000000 +0100
@@ -0,0 +1,181 @@
+##
+## twiki.spec -- OpenPKG RPM Specification
+## Copyright (c) 2000-2004 The OpenPKG Project <http://www.openpkg.org/>
+## Copyright (c) 2000-2004 Ralf S. Engelschall <[EMAIL PROTECTED]>
+## Copyright (c) 2000-2004 Cable & Wireless <http://www.cw.com/>
+##
+## 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 information
+Name: twiki
+Summary: Wiki Wiki based Collaboration Platform
+URL: http://twiki.org/
+Vendor: Peter Thoeny
+Packager: The OpenPKG Project
+Distribution: OpenPKG
+Class: EVAL
+Group: Web
+License: GPL
+Version: 20040119
+Release: 20040214
+
+# list of sources
+Source0: http://TWikiGuest:[EMAIL PROTECTED]/release/TWiki%{version}beta.zip
+Source1: twiki-apache.conf
+Source2: rc.twiki
+
+# build information
+Prefix: %{l_prefix}
+BuildRoot: %{l_buildroot}
+BuildPreReq: OpenPKG, openpkg >= 20040130, infozip, perl
+PreReq: OpenPKG, openpkg >= 20040130
+PreReq: perl, perl-net, perl-mail, perl-crypto
+PreReq: rcs, diffutils, grep
+PreReq: apache, MTA
+AutoReq: no
+AutoReqProv: no
+
+%description
+ TWiki s a flexible, powerful, and easy to use Web-based
+ collaboration platform based on the popular Wiki Wiki principle.
+
+%track
+ prog twiki = {
+ version = %{version}
+ url = http://TWikiGuest:[EMAIL
PROTECTED]/cgi-bin/view/Codev/TWikiBetaRelease
+ regex = TWiki(__VER__)beta\.zip
+ }
+
+%prep
+ %setup -q -c -T
+ %{l_prefix}/bin/unzip -x -q %{SOURCE0}
+
+%build
+
+%install
+ # create installation area
+ rm -rf $RPM_BUILD_ROOT
+ %{l_shtool} mkdir -f -p -m 755 \
+ $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d \
+ $RPM_BUILD_ROOT%{l_prefix}/etc/twiki \
+ $RPM_BUILD_ROOT%{l_prefix}/lib/twiki \
+ $RPM_BUILD_ROOT%{l_prefix}/libexec/twiki \
+ $RPM_BUILD_ROOT%{l_prefix}/var/twiki
+
+ # install TWiki CGIs
+ # (set path to custom Perl and library path)
+ %{l_shtool} install -c -m 755 \
+ -e 's;/usr/bin/perl;%{l_prefix}/bin/perl;g' \
+ -e "s;'../lib';'%{l_prefix}/lib/twiki';g" \
+ bin/* $RPM_BUILD_ROOT%{l_prefix}/libexec/twiki/
+
+ # install TWiki library and configuration
+ # (move primary configuration file to canonical location and pre-configure)
+ %{l_shtool} install -c -m 644 \
+ -e 's;http://your.domain.com;http://localhost;g' \
+ -e 's;/home/httpd/twiki/pub;%{l_prefix}/var/twiki/pub;g' \
+ -e 's;/home/httpd/twiki/templates;%{l_prefix}/etc/twiki/tmpl;g' \
+ -e 's;/home/httpd/twiki/data;%{l_prefix}/var/twiki/data;g' \
+ -e 's;/usr/sbin/sendmail;%{l_prefix}/sbin/sendmail;g' \
+ -e "s;'/usr/bin';'%{l_prefix}/bin';g" \
+ -e 's;/bin/egrep;%{l_prefix}/bin/egrep;g' \
+ -e 's;/bin/fgrep;%{l_prefix}/bin/fgrep;g' \
+ lib/TWiki.cfg \
+ $RPM_BUILD_ROOT%{l_prefix}/etc/twiki/twiki.conf
+ rm -f lib/TWiki.cfg
+ ( cd lib && %{l_tar} cf - . ) | \
+ ( cd $RPM_BUILD_ROOT%{l_prefix}/lib/twiki && %{l_tar} xf - ) || exit $?
+ ln $RPM_BUILD_ROOT%{l_prefix}/etc/twiki/twiki.conf \
+ $RPM_BUILD_ROOT%{l_prefix}/lib/twiki/TWiki.cfg
+
+ # install TWiki initial data
+ # (adjust RCS content for Apache run-time environment)
+ %{l_prefix}/bin/perl \
+ -pi.orig -e 'NR <= 10 && s/nobody:/%{l_nusr}:/' \
+ data/*/*,v
+ find data -type f -name "*.orig" -print | xargs rm -f
+ find data -type f -print | xargs chmod 664
+ find data -type d -print | xargs chmod 775
+ %{l_tar} cf - data | \
+ ( cd $RPM_BUILD_ROOT%{l_prefix}/var/twiki && %{l_tar} xf - ) || exit $?
+
+ # install TWiki public files
+ find pub -type f -print | xargs chmod 664
+ find pub -type d -print | xargs chmod 775
+ %{l_tar} cf - pub | \
+ ( cd $RPM_BUILD_ROOT%{l_prefix}/var/twiki && %{l_tar} xf - ) || exit $?
+
+ # install TWiki template files
+ mv templates tmpl
+ find tmpl -type f -print | xargs chmod 664
+ find tmpl -type d -print | xargs chmod 775
+ %{l_tar} cf - tmpl | \
+ ( cd $RPM_BUILD_ROOT%{l_prefix}/etc/twiki && %{l_tar} xf - ) || exit $?
+
+ # install Apache configuration
+ %{l_shtool} install -c -m 644 %{l_value -s -a} \
+ %{SOURCE twiki-apache.conf} \
+ $RPM_BUILD_ROOT%{l_prefix}/etc/twiki/
+
+ # install run-command script
+ %{l_shtool} install -c -m 755 %{l_value -s -a} \
+ %{SOURCE rc.twiki} \
+ $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d/
+
+ # determine installation files
+ %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
+ %{l_files_std} \
+ '%config %{l_prefix}/etc/twiki/twiki*' \
+ '%config %{l_prefix}/etc/twiki/templates/*' \
+ '%attr(-,%{l_nusr},%{l_ngrp}) %{l_prefix}/var/twiki'
+
+%files -f files
+
+%clean
+ rm -rf $RPM_BUILD_ROOT
+
+%post
+ if [ ".$1" = .1 ]; then
+ # add hook to Apache configuration
+ apacheconf="$RPM_INSTALL_PREFIX/etc/apache/apache.conf"
+ if [ -f $apacheconf ]; then
+ ( echo "Include $RPM_INSTALL_PREFIX/etc/twiki/twiki-apache.conf"
+ ) | $RPM_INSTALL_PREFIX/lib/openpkg/rpmtool config \
+ -a -i "$RPM_INSTALL_PREFIX:twiki" $apacheconf
+ fi
+
+ # display information about steps the admin should perform next
+ ( echo "TWiki was successfully installed. You should now start Apache with"
+ echo " \$ $RPM_INSTALL_PREFIX/etc/rc apache start"
+ echo "and then edit the TWiki site-level preferences under:"
+ echo " http://localhost/twiki/bin/view/TWiki/TWikiPreferences"
+ ) | %{l_rpmtool} msg -b -t notice
+ fi
+
+%postun
+ if [ ".$1" = .0 ]; then
+ # remove hook from Apache configuration
+ apacheconf="$RPM_INSTALL_PREFIX/etc/apache/apache.conf"
+ if [ -f $apacheconf ]; then
+ $RPM_INSTALL_PREFIX/lib/openpkg/rpmtool config \
+ -r -i "$RPM_INSTALL_PREFIX:twiki" $apacheconf
+ fi
+ fi
+
@@ .
______________________________________________________________________
The OpenPKG Project www.openpkg.org
CVS Repository Commit List [EMAIL PROTECTED]