head	1.22;
access;
symbols
	OPENPKG_E1_MP_HEAD:1.16
	OPENPKG_E1_MP:1.16
	OPENPKG_E1_MP_2_STABLE:1.14.2.2
	OPENPKG_E1_FP:1.14.2.2
	OPENPKG_2_STABLE_MP:1.19
	OPENPKG_2_STABLE_20061018:1.14.2.2
	OPENPKG_2_STABLE:1.14.0.2
	OPENPKG_CW_FP:1.9;
locks; strict;
comment	@-- @;


1.22
date	2009.04.18.13.17.12;	author rse;	state Exp;
branches;
next	1.21;
commitid	4pHXU27WTIGCZuKt;

1.21
date	2008.01.01.15.06.18;	author rse;	state Exp;
branches;
next	1.20;
commitid	B8esaHJHoduuKILs;

1.20
date	2007.04.18.21.46.26;	author thl;	state Exp;
branches;
next	1.19;
commitid	WyQKNMwmoITBoBes;

1.19
date	2007.02.05.07.55.13;	author rse;	state Exp;
branches;
next	1.18;
commitid	0CZSzgvMf7Yd7h5s;

1.18
date	2007.01.17.18.09.47;	author cs;	state Exp;
branches;
next	1.17;
commitid	hXe54M9AX0kV7T2s;

1.17
date	2007.01.10.07.15.07;	author rse;	state Exp;
branches;
next	1.16;
commitid	c5tBjZL4VyBhJV1s;

1.16
date	2007.01.01.17.42.29;	author rse;	state Exp;
branches;
next	1.15;
commitid	BicZD6VUl7GuqP0s;

1.15
date	2006.11.11.14.29.50;	author rse;	state Exp;
branches;
next	1.14;
commitid	52WxFeM9DjvZ3gUr;

1.14
date	2006.10.13.17.35.07;	author thl;	state Exp;
branches
	1.14.2.1;
next	1.13;
commitid	q5GSxzsSDX29XxQr;

1.13
date	2006.09.23.10.31.33;	author rse;	state Exp;
branches;
next	1.12;
commitid	Vp4iOsNLO3KRjWNr;

1.12
date	2006.08.25.19.20.10;	author rse;	state Exp;
branches;
next	1.11;
commitid	Tvsj1UyQ8rQ89gKr;

1.11
date	2006.01.01.13.23.30;	author rse;	state Exp;
branches;
next	1.10;
commitid	otZG8yKMCw1JFTfr;

1.10
date	2005.03.24.11.20.34;	author rse;	state Exp;
branches;
next	1.9;

1.9
date	2005.01.01.10.55.29;	author rse;	state Exp;
branches;
next	1.8;

1.8
date	2004.11.07.12.12.26;	author rse;	state Exp;
branches;
next	1.7;

1.7
date	2004.10.30.17.29.42;	author rse;	state Exp;
branches;
next	1.6;

1.6
date	2004.10.25.11.18.12;	author hms;	state Exp;
branches;
next	1.5;

1.5
date	2004.08.08.07.38.41;	author rse;	state Exp;
branches;
next	1.4;

1.4
date	2004.07.31.07.36.19;	author rse;	state Exp;
branches;
next	1.3;

1.3
date	2004.05.09.17.56.33;	author rse;	state Exp;
branches;
next	1.2;

1.2
date	2004.03.22.08.41.03;	author tho;	state Exp;
branches;
next	1.1;

1.1
date	2004.02.14.13.47.56;	author rse;	state Exp;
branches;
next	;

1.14.2.1
date	2006.10.13.17.35.07;	author rse;	state dead;
branches;
next	1.14.2.2;
commitid	iZxwRSmmWscPXUQr;

1.14.2.2
date	2006.10.16.14.57.28;	author rse;	state Exp;
branches;
next	1.14.2.3;
commitid	iZxwRSmmWscPXUQr;

1.14.2.3
date	2007.02.11.14.43.30;	author rse;	state Exp;
branches;
next	;
commitid	A21A8bvonV1lb56s;


desc
@@


1.22
log
@bump years in copyright messages
@
text
@##
##  twiki.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 information
Name:         twiki
Summary:      Wiki Wiki based Collaboration Platform
URL:          http://twiki.org/
Vendor:       Peter Thoeny
Packager:     OpenPKG Foundation e.V.
Distribution: OpenPKG Community
Class:        EVAL
Group:        CMS
License:      GPL
Version:      4.1.1
Release:      20080101

#   list of sources
Source0:      http://twiki.org/p/pub/Codev/Release/TWiki-%{version}.tgz
Source1:      twiki-apache.conf
Source2:      rc.twiki

#   build information
Prefix:       %{l_prefix}
BuildRoot:    %{l_buildroot}
BuildPreReq:  OpenPKG, openpkg >= 20060823, perl
PreReq:       OpenPKG, openpkg >= 20060823
PreReq:       perl, perl-www, perl-net, perl-mail, perl-crypto, perl-vcs
PreReq:       rcs, patch, 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://twiki.org/cgi-bin/view/Codev/DownloadTWiki
        regex     = TWiki-(__VER__)\.tgz
    }

%prep
    %setup -q -c

%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 and configuration
    %{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/
    ( cd bin && %{l_tar} cf - logos ) | \
    ( cd $RPM_BUILD_ROOT%{l_prefix}/libexec/twiki && %{l_tar} xf - ) || exit $?
    %{l_shtool} install -c -m 644 \
        -e 's;/absolute/path/to/your/lib;%{l_prefix}/lib/twiki;g' \
        -e 's;^# \(@@localPerlLibPath = ( .\)/path/to/dir;\1%{l_prefix}/lib/twiki;g' \
        bin/LocalLib.cfg.txt \
        $RPM_BUILD_ROOT%{l_prefix}/etc/twiki/twiki-lib.cfg
    ln  $RPM_BUILD_ROOT%{l_prefix}/etc/twiki/twiki-lib.cfg \
        $RPM_BUILD_ROOT%{l_prefix}/libexec/twiki/LocalSite.cfg
    rm -f $RPM_BUILD_ROOT%{l_prefix}/libexec/twiki/LocalLib.cfg.txt

    #   install TWiki library and configuration
    %{l_shtool} subst \
        -e 's;/usr/sbin/sendmail;%{l_prefix}/sbin/sendmail;g' \
        -e "s;'/usr/bin';'%{l_prefix}/bin';g" \
        -e "s;'/bin:/usr/bin';'%{l_prefix}/bin:/bin:/usr/bin';g" \
        -e 's;/bin/egrep;%{l_prefix}/bin/egrep;g' \
        -e 's;/bin/fgrep;%{l_prefix}/bin/fgrep;g' \
        lib/TWiki.spec
    ( cd lib && %{l_tar} cf - . ) | \
    ( cd $RPM_BUILD_ROOT%{l_prefix}/lib/twiki && %{l_tar} xf - ) || exit $?
    %{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 '/^1;$/d' \
        lib/LocalSite.cfg.txt \
        $RPM_BUILD_ROOT%{l_prefix}/etc/twiki/twiki-site.cfg
    ( echo ""
      echo "\$TWiki::cfg{LocalesDir} = '%{l_prefix}/libexec/twiki/configurelocale';"
      echo "\$TWiki::cfg{Password} = '0NQiQSaRf7IKo';"
      echo "\$TWiki::cfg{Site}{Lang} = 'en';"
      echo "\$TWiki::cfg{Site}{FullLang} = 'en-us';"
      echo "\$TWiki::cfg{Site}{CharSet} = 'iso-8859-15';"
      echo ""
      echo "1;"
    ) >>$RPM_BUILD_ROOT%{l_prefix}/etc/twiki/twiki-site.cfg
    ln  $RPM_BUILD_ROOT%{l_prefix}/etc/twiki/twiki-site.cfg \
        $RPM_BUILD_ROOT%{l_prefix}/lib/twiki/LocalSite.cfg
    rm -f $RPM_BUILD_ROOT%{l_prefix}/lib/twiki/LocalSite.cfg.txt
    find $RPM_BUILD_ROOT%{l_prefix}/lib/twiki -type f -print | xargs chmod 664
    find $RPM_BUILD_ROOT%{l_prefix}/lib/twiki -type d -print | xargs chmod 775

    #   install TWiki initial data
    #   (adjust RCS content for Apache run-time environment)
    find data -name "*,v" -type f -print | xargs \
    %{l_prefix}/bin/perl \
        -pi.orig -e 'NR <= 10 && s/nobody:/%{l_nusr}:/'
    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/bin/openpkg rc apache start"
          echo "and then edit the TWiki site-level preferences:"
          echo "    http://localhost/twiki/bin/view/TWiki/TWikiPreferences"
          echo "The top-level TWiki page is:"
          echo "    http://localhost/twiki/bin/view"
        ) | %{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

@


1.21
log
@Update package specifications according to OpenPKG year 2008 world order:
http://www.mail-archive.com/openpkg-announce@@openpkg.org/msg00221.html
@
text
@d3 1
a3 1
##  Copyright (c) 2000-2008 OpenPKG Foundation e.V. <http://openpkg.net/>
@


1.20
log
@get rid of direct /etc/rc call and replace them with openpkg
@
text
@d3 1
a3 2
##  Copyright (c) 2000-2007 OpenPKG Foundation e.V. <http://openpkg.net/>
##  Copyright (c) 2000-2007 Ralf S. Engelschall <http://engelschall.com/>
d35 1
a35 1
Release:      20070418
@


1.19
log
@upgrading package: twiki 4.1.0 -> 4.1.1
@
text
@d36 1
a36 1
Release:      20070205
d187 1
a187 1
          echo "  \$ $RPM_INSTALL_PREFIX/etc/rc apache start"
@


1.18
log
@upgrading package: twiki 4.0.5 -> 4.1.0
@
text
@d35 2
a36 2
Version:      4.1.0
Release:      20070117
@


1.17
log
@add missing perl-vcs for Algorithm::Diff
@
text
@d35 2
a36 2
Version:      4.0.5
Release:      20070110
d103 1
a103 1
        lib/TWiki.cfg
@


1.16
log
@Welcome Year 2007!
@
text
@d36 1
a36 1
Release:      20061111
d48 1
a48 1
PreReq:       perl, perl-www, perl-net, perl-mail, perl-crypto
@


1.15
log
@finally upgrade from the old 2004 snapshot to the latest release 4.0.5
@
text
@d3 2
a4 2
##  Copyright (c) 2000-2006 OpenPKG Foundation e.V. <http://openpkg.net/>
##  Copyright (c) 2000-2006 Ralf S. Engelschall <http://engelschall.com/>
@


1.14
log
@new world order for "Packager" and "Distribution" headers
@
text
@d35 2
a36 2
Version:      20041030
Release:      20061013
d39 1
a39 1
Source0:      http://TWikiGuest:guest@@twiki.org/release/TWiki%{version}beta.zip
d46 1
a46 1
BuildPreReq:  OpenPKG, openpkg >= 20060823, infozip, perl
d48 2
a49 2
PreReq:       perl, perl-net, perl-mail, perl-crypto
PreReq:       rcs, diffutils, grep
d61 2
a62 2
        url       = http://TWikiGuest:guest@@twiki.org/cgi-bin/view/Codev/TWikiBetaRelease
        regex     = TWiki(__VER__)beta\.zip
d66 1
a66 2
    %setup -q -c -T
    %{l_prefix}/bin/unzip -x -q %{SOURCE0}
d80 1
a80 2
    #   install TWiki CGIs
    #   (set path to custom Perl and library path)
d83 1
a83 1
        -e "s;'../lib';'%{l_prefix}/lib/twiki';g" \
d85 10
d97 1
a97 6
    #   (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' \
d100 1
d103 1
a103 3
        lib/TWiki.cfg \
        $RPM_BUILD_ROOT%{l_prefix}/etc/twiki/twiki.conf
    rm -f lib/TWiki.cfg
d106 22
a127 2
    ln  $RPM_BUILD_ROOT%{l_prefix}/etc/twiki/twiki.conf \
        $RPM_BUILD_ROOT%{l_prefix}/lib/twiki/TWiki.cfg
d131 1
d133 1
a133 2
        -pi.orig -e 'NR <= 10 && s/nobody:/%{l_nusr}:/' \
        data/*/*,v
d166 1
a166 1
        '%config %{l_prefix}/etc/twiki/twiki*' \
d188 4
a191 2
          echo "and then edit the TWiki site-level preferences under:"
          echo "  http://localhost/twiki/bin/view/TWiki/TWikiPreferences"
@


1.14.2.1
log
@file twiki.spec was added on branch OPENPKG_2_STABLE on 2006-10-16 14:57:28 +0000
@
text
@d1 180
@


1.14.2.2
log
@Mass merge from CURRENT to 2-STABLE (all packages except those of JUNK class)
@
text
@a0 180
##
##  twiki.spec -- OpenPKG RPM Package Specification
##  Copyright (c) 2000-2006 OpenPKG Foundation e.V. <http://openpkg.net/>
##  Copyright (c) 2000-2006 Ralf S. Engelschall <http://engelschall.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:     OpenPKG Foundation e.V.
Distribution: OpenPKG Community
Class:        EVAL
Group:        CMS
License:      GPL
Version:      20041030
Release:      2.20061018

#   list of sources
Source0:      http://TWikiGuest:guest@@twiki.org/release/TWiki%{version}beta.zip
Source1:      twiki-apache.conf
Source2:      rc.twiki

#   build information
Prefix:       %{l_prefix}
BuildRoot:    %{l_buildroot}
BuildPreReq:  OpenPKG, openpkg >= 2.20061018, infozip, perl
PreReq:       OpenPKG, openpkg >= 2.20061018
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:guest@@twiki.org/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

@


1.14.2.3
log
@MFC: security fixed version
@
text
@d3 2
a4 2
##  Copyright (c) 2000-2007 OpenPKG Foundation e.V. <http://openpkg.net/>
##  Copyright (c) 2000-2007 Ralf S. Engelschall <http://engelschall.com/>
d35 2
a36 2
Version:      4.1.1
Release:      2.20070211
d39 1
a39 1
Source0:      http://twiki.org/p/pub/Codev/Release/TWiki-%{version}.tgz
d46 1
a46 1
BuildPreReq:  OpenPKG, openpkg >= 2.20061018, perl
d48 2
a49 2
PreReq:       perl, perl-www, perl-net, perl-mail, perl-crypto, perl-vcs
PreReq:       rcs, patch, diffutils, grep
d61 2
a62 2
        url       = http://twiki.org/cgi-bin/view/Codev/DownloadTWiki
        regex     = TWiki-(__VER__)\.tgz
d66 2
a67 1
    %setup -q -c
d81 2
a82 1
    #   install TWiki CGIs and configuration
d85 1
a85 1
        -e "s;'\.\./lib';'%{l_prefix}/lib/twiki';g" \
a86 10
    ( cd bin && %{l_tar} cf - logos ) | \
    ( cd $RPM_BUILD_ROOT%{l_prefix}/libexec/twiki && %{l_tar} xf - ) || exit $?
    %{l_shtool} install -c -m 644 \
        -e 's;/absolute/path/to/your/lib;%{l_prefix}/lib/twiki;g' \
        -e 's;^# \(@@localPerlLibPath = ( .\)/path/to/dir;\1%{l_prefix}/lib/twiki;g' \
        bin/LocalLib.cfg.txt \
        $RPM_BUILD_ROOT%{l_prefix}/etc/twiki/twiki-lib.cfg
    ln  $RPM_BUILD_ROOT%{l_prefix}/etc/twiki/twiki-lib.cfg \
        $RPM_BUILD_ROOT%{l_prefix}/libexec/twiki/LocalSite.cfg
    rm -f $RPM_BUILD_ROOT%{l_prefix}/libexec/twiki/LocalLib.cfg.txt
d89 6
a94 1
    %{l_shtool} subst \
a96 1
        -e "s;'/bin:/usr/bin';'%{l_prefix}/bin:/bin:/usr/bin';g" \
d99 3
a101 1
        lib/TWiki.spec
d104 2
a105 22
    %{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 '/^1;$/d' \
        lib/LocalSite.cfg.txt \
        $RPM_BUILD_ROOT%{l_prefix}/etc/twiki/twiki-site.cfg
    ( echo ""
      echo "\$TWiki::cfg{LocalesDir} = '%{l_prefix}/libexec/twiki/configurelocale';"
      echo "\$TWiki::cfg{Password} = '0NQiQSaRf7IKo';"
      echo "\$TWiki::cfg{Site}{Lang} = 'en';"
      echo "\$TWiki::cfg{Site}{FullLang} = 'en-us';"
      echo "\$TWiki::cfg{Site}{CharSet} = 'iso-8859-15';"
      echo ""
      echo "1;"
    ) >>$RPM_BUILD_ROOT%{l_prefix}/etc/twiki/twiki-site.cfg
    ln  $RPM_BUILD_ROOT%{l_prefix}/etc/twiki/twiki-site.cfg \
        $RPM_BUILD_ROOT%{l_prefix}/lib/twiki/LocalSite.cfg
    rm -f $RPM_BUILD_ROOT%{l_prefix}/lib/twiki/LocalSite.cfg.txt
    find $RPM_BUILD_ROOT%{l_prefix}/lib/twiki -type f -print | xargs chmod 664
    find $RPM_BUILD_ROOT%{l_prefix}/lib/twiki -type d -print | xargs chmod 775
a108 1
    find data -name "*,v" -type f -print | xargs \
d110 2
a111 1
        -pi.orig -e 'NR <= 10 && s/nobody:/%{l_nusr}:/'
d144 1
a144 1
        '%config %{l_prefix}/etc/twiki/twiki-*' \
d166 2
a167 4
          echo "and then edit the TWiki site-level preferences:"
          echo "    http://localhost/twiki/bin/view/TWiki/TWikiPreferences"
          echo "The top-level TWiki page is:"
          echo "    http://localhost/twiki/bin/view"
@


1.13
log
@adjust Group header
@
text
@d30 2
a31 2
Packager:     OpenPKG
Distribution: OpenPKG
d36 1
a36 1
Release:      20060923
@


1.12
log
@replace '@@l_prefix@@/lib/openpkg/bash @@l_prefix@@/etc/rc' in shebang with '@@l_prefix@@/bin/openpkg rc' to allow people who run the rc.xxx scripts directly (as executables) to leverage from the Set-UID functionality
@
text
@d33 1
a33 1
Group:        Web
d36 1
a36 1
Release:      20060825
@


1.11
log
@adjust copyrights for new year 2006
@
text
@d36 1
a36 1
Release:      20041107
d46 2
a47 2
BuildPreReq:  OpenPKG, openpkg >= 20040130, infozip, perl
PreReq:       OpenPKG, openpkg >= 20040130
@


1.10
log
@Adjust the copyright declaration in this (RSE's) copy of the OpenPKG
source code now that the fork point for C&W was established (CVS tag
OPENPKG_CW_FP), the shared copyright agreement between RSE and C&W is
no longer active (as C&W no longer officially sponsors OpenPKG) and the
new shared copyright from RSE can be taken over by the newly established
juristic entity OpenPKG Foundation e.V. (instead of the non-juristic
entity OpenPKG Project).
@
text
@d3 2
a4 2
##  Copyright (c) 2000-2005 OpenPKG Foundation e.V. <http://openpkg.net/>
##  Copyright (c) 2000-2005 Ralf S. Engelschall <http://engelschall.com/>
@


1.9
log
@Happy New Year 2005
@
text
@d2 3
a4 4
##  twiki.spec -- OpenPKG RPM Specification
##  Copyright (c) 2000-2005 The OpenPKG Project <http://www.openpkg.org/>
##  Copyright (c) 2000-2005 Ralf S. Engelschall <rse@@engelschall.com>
##  Copyright (c) 2000-2005 Cable & Wireless <http://www.cw.com/>
d30 1
a30 1
Packager:     The OpenPKG Project
@


1.8
log
@fix Apache config
@
text
@d3 3
a5 3
##  Copyright (c) 2000-2004 The OpenPKG Project <http://www.openpkg.org/>
##  Copyright (c) 2000-2004 Ralf S. Engelschall <rse@@engelschall.com>
##  Copyright (c) 2000-2004 Cable & Wireless <http://www.cw.com/>
@


1.7
log
@upgrading package: twiki 20041024 -> 20041030
@
text
@d37 1
a37 1
Release:      20041030
@


1.6
log
@upgrading package: twiki 20040730 -> 20041024
@
text
@d36 2
a37 2
Version:      20041024
Release:      20041025
@


1.5
log
@upgrading package: twiki 20040729 -> 20040730
@
text
@d36 2
a37 2
Version:      20040730
Release:      20040808
@


1.4
log
@upgrading package: twiki 20040507 -> 20040729
@
text
@d36 2
a37 2
Version:      20040729
Release:      20040731
@


1.3
log
@upgrading package: twiki 20040320 -> 20040507
@
text
@d36 2
a37 2
Version:      20040507
Release:      20040509
@


1.2
log
@upgrading package: twiki 20040119 -> 20040320
@
text
@d36 2
a37 2
Version:      20040320
Release:      20040322
@


1.1
log
@new package: twiki 20040119 (Wiki Wiki based Collaboration Platform)
@
text
@d36 2
a37 2
Version:      20040119
Release:      20040214
@

