Переглянути джерело

new package: kwiki 0.33 (Kwiki Wiki Engine)

Ralf S. Engelschall 21 роки тому
батько
коміт
0afe68aac4
2 змінених файлів з 316 додано та 0 видалено
  1. 25 0
      kwiki/kwiki-apache.conf
  2. 291 0
      kwiki/kwiki.spec

+ 25 - 0
kwiki/kwiki-apache.conf

@@ -0,0 +1,25 @@
+##  
+##  kwiki-apache.conf -- Apache Configuration for Kwiki
+##
+
+Alias /kwiki/ @l_prefix@/var/kwiki/
+
+<Directory @l_prefix@/var/kwiki>
+    Order allow,deny
+    Allow from all
+    AllowOverride None
+    Options ExecCGI
+    AddHandler cgi-script .cgi
+    DirectoryIndex index.cgi
+    #<Files admin.cgi>
+    #    Require user admin
+    #    AuthType Basic
+    #    AuthName Restricted
+    #    AuthUserFile @l_prefix@/var/kwiki/passwd
+    #</Files>
+    <Files passwd>
+        Order allow,deny
+        Deny from all
+    </Files>
+</Directory>
+

+ 291 - 0
kwiki/kwiki.spec

@@ -0,0 +1,291 @@
+##
+##  kwiki.spec -- OpenPKG RPM Specification
+##  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/>
+##
+##  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 versions
+%define       V_spoon                    0.18
+%define       V_kwiki                    0.33
+%define       V_kwiki_anchorlink         0.02
+%define       V_kwiki_archive_rcs        0.11
+%define       V_kwiki_autoformat         0.02
+%define       V_kwiki_cache              0.10
+%define       V_kwiki_revisions          0.12
+%define       V_kwiki_diff               0.01
+%define       V_kwiki_recentchanges      0.11
+%define       V_kwiki_recentchangesrss   0.04
+%define       V_kwiki_search             0.11
+%define       V_kwiki_formatter_pod      0.10
+%define       V_kwiki_gdgraphgenerator   0.03
+%define       V_kwiki_googlelink         0.01
+%define       V_kwiki_icons_crystal      0.12
+%define       V_kwiki_icons_gnome        0.14
+%define       V_kwiki_image              0.01
+%define       V_kwiki_mindmap            0.08
+%define       V_kwiki_modperl            0.03
+%define       V_kwiki_newpage            0.11
+%define       V_kwiki_notify_mail        0.02
+%define       V_kwiki_pageinclude        0.01
+%define       V_kwiki_paragraphblocks    0.11
+%define       V_kwiki_preformattedblocks 0.10
+%define       V_kwiki_shellblocks        0.02
+%define       V_kwiki_shortcutlinks      0.02
+%define       V_kwiki_toolbar_list       0.01
+%define       V_kwiki_username           0.12
+%define       V_kwiki_userpreferences    0.11
+%define       V_kwiki_vimmode            0.04
+
+#   package information
+Name:         kwiki
+Summary:      Kwiki Wiki Engine
+URL:          http://www.kwiki.org/
+Vendor:       Brian Ingerson et al.
+Packager:     The OpenPKG Project
+Distribution: OpenPKG
+Class:        EVAL
+Group:        Web
+License:      GPL/Artistic
+Version:      %{V_kwiki}
+Release:      20041107
+
+#   list of sources
+Source0:      http://www.cpan.org/authors/id/I/IN/INGY/Spoon-%{V_spoon}.tar.gz
+Source1:      http://www.cpan.org/modules/by-module/Kwiki/Kwiki-%{V_kwiki}.tar.gz
+Source2:      http://www.cpan.org/modules/by-module/Kwiki/Kwiki-AnchorLink-%{V_kwiki_anchorlink}.tar.gz
+Source3:      http://www.cpan.org/modules/by-module/Kwiki/Kwiki-Archive-Rcs-%{V_kwiki_archive_rcs}.tar.gz
+Source4:      http://www.cpan.org/modules/by-module/Kwiki/Kwiki-Autoformat-%{V_kwiki_autoformat}.tar.gz
+Source5:      http://www.cpan.org/modules/by-module/Kwiki/Kwiki-Cache-%{V_kwiki_cache}.tar.gz
+Source6:      http://www.cpan.org/modules/by-module/Kwiki/Kwiki-Revisions-%{V_kwiki_revisions}.tar.gz
+Source7:      http://www.cpan.org/modules/by-module/Kwiki/Kwiki-Diff-%{V_kwiki_diff}.tar.gz
+Source8:      http://www.cpan.org/modules/by-module/Kwiki/Kwiki-RecentChanges-%{V_kwiki_recentchanges}.tar.gz
+Source9:      http://www.cpan.org/modules/by-module/Kwiki/Kwiki-RecentChangesRSS-%{V_kwiki_recentchangesrss}.tar.gz
+Source10:     http://www.cpan.org/modules/by-module/Kwiki/Kwiki-Search-%{V_kwiki_search}.tar.gz
+Source11:     http://www.cpan.org/modules/by-module/Kwiki/Kwiki-Formatter-Pod-%{V_kwiki_formatter_pod}.tar.gz
+Source12:     http://www.cpan.org/modules/by-module/Kwiki/Kwiki-GDGraphGenerator-%{V_kwiki_gdgraphgenerator}.tar.gz
+Source13:     http://www.cpan.org/modules/by-module/Kwiki/Kwiki-GoogleLink-%{V_kwiki_googlelink}.tar.gz
+Source14:     http://www.cpan.org/modules/by-module/Kwiki/Kwiki-Icons-Crystal-%{V_kwiki_icons_crystal}.tar.gz
+Source15:     http://www.cpan.org/modules/by-module/Kwiki/Kwiki-Icons-Gnome-%{V_kwiki_icons_gnome}.tar.gz
+Source16:     http://www.cpan.org/modules/by-module/Kwiki/Kwiki-Image-%{V_kwiki_image}.tar.gz
+Source17:     http://www.cpan.org/modules/by-module/Kwiki/Kwiki-MindMap-%{V_kwiki_mindmap}.tar.gz
+Source18:     http://www.cpan.org/modules/by-module/Kwiki/Kwiki-ModPerl-%{V_kwiki_modperl}.tar.gz
+Source19:     http://www.cpan.org/modules/by-module/Kwiki/Kwiki-NewPage-%{V_kwiki_newpage}.tar.gz
+Source20:     http://www.cpan.org/modules/by-module/Kwiki/Kwiki-Notify-Mail-%{V_kwiki_notify_mail}.tar.gz
+Source21:     http://www.cpan.org/modules/by-module/Kwiki/Kwiki-PageInclude-%{V_kwiki_pageinclude}.tar.gz
+Source22:     http://www.cpan.org/modules/by-module/Kwiki/Kwiki-ParagraphBlocks-%{V_kwiki_paragraphblocks}.tar.gz
+Source23:     http://www.cpan.org/modules/by-module/Kwiki/Kwiki-PreformattedBlocks-%{V_kwiki_preformattedblocks}.tar.gz
+Source24:     http://www.cpan.org/modules/by-module/Kwiki/Kwiki-ShellBlocks-%{V_kwiki_shellblocks}.tar.gz
+Source25:     http://www.cpan.org/modules/by-module/Kwiki/Kwiki-ShortcutLinks-%{V_kwiki_shortcutlinks}.tar.gz
+Source26:     http://www.cpan.org/modules/by-module/Kwiki/Kwiki-Toolbar-List-%{V_kwiki_toolbar_list}.tar.gz
+Source27:     http://www.cpan.org/modules/by-module/Kwiki/Kwiki-UserName-%{V_kwiki_username}.tar.gz
+Source28:     http://www.cpan.org/modules/by-module/Kwiki/Kwiki-UserPreferences-%{V_kwiki_userpreferences}.tar.gz
+Source29:     http://www.cpan.org/modules/by-module/Kwiki/Kwiki-VimMode-%{V_kwiki_vimmode}.tar.gz
+Source100:    kwiki-apache.conf
+
+#   build information
+Prefix:       %{l_prefix}
+BuildRoot:    %{l_buildroot}
+BuildPreReq:  OpenPKG, openpkg >= 20040130, perl, perl-openpkg
+PreReq:       OpenPKG, openpkg >= 20040130, perl, apache
+BuildPreReq:  perl-sys, perl-parse, perl-text, perl-mail
+PreReq:       perl-sys, perl-parse, perl-text, perl-mail
+AutoReq:      no
+AutoReqProv:  no
+
+%description
+    Kwiki is perhaps the simplest to install, most modular, and easiest
+    to extend Wiki engine. It is implemented in Perl and uses a flexible
+    plugin architecture.
+
+%track
+    prog kwiki:Spoon = {
+        version   = %{V_spoon}
+        url       = http://www.cpan.org/authors/id/I/IN/INGY/
+        regex     = Spoon-(__VER__)\.tar\.gz
+    }
+    prog kwiki:Kwiki = {
+        version   = %{V_kwiki}
+        url       = http://www.cpan.org/modules/by-module/Kwiki/
+        regex     = Kwiki-(__VER__)\.tar\.gz
+    }
+    prog kwiki:Kwiki-AnchorLink = {
+        version   = %{V_kwiki_anchorlink}
+        url       = http://www.cpan.org/modules/by-module/Kwiki/
+        regex     = Kwiki-AnchorLink-(__VER__)\.tar\.gz
+    }
+    prog kwiki:Kwiki-Archive-Rcs = {
+        version   = %{V_kwiki_archive_rcs}
+        url       = http://www.cpan.org/modules/by-module/Kwiki/
+        regex     = Kwiki-Archive-Rcs-(__VER__)\.tar\.gz
+    }
+    prog kwiki:Kwiki-Autoformat = {
+        version   = %{V_kwiki_autoformat}
+        url       = http://www.cpan.org/modules/by-module/Kwiki/
+        regex     = Kwiki-Autoformat-(__VER__)\.tar\.gz
+    }
+    prog kwiki:Kwiki-Cache = {
+        version   = %{V_kwiki_cache}
+        url       = http://www.cpan.org/modules/by-module/Kwiki/
+        regex     = Kwiki-Cache-(__VER__)\.tar\.gz
+    }
+
+%prep
+    %setup -q -c
+    %setup -q -T -D -a 1
+    %setup -q -T -D -a 2
+    %setup -q -T -D -a 3
+    %setup -q -T -D -a 4
+    %setup -q -T -D -a 5
+    %setup -q -T -D -a 6
+    %setup -q -T -D -a 7
+    %setup -q -T -D -a 8
+    %setup -q -T -D -a 9
+    %setup -q -T -D -a 10
+    %setup -q -T -D -a 11
+    %setup -q -T -D -a 12
+    %setup -q -T -D -a 13
+    %setup -q -T -D -a 14
+    %setup -q -T -D -a 15
+    %setup -q -T -D -a 16
+    %setup -q -T -D -a 17
+    %setup -q -T -D -a 18
+    %setup -q -T -D -a 19
+    %setup -q -T -D -a 20
+    %setup -q -T -D -a 21
+    %setup -q -T -D -a 22
+    %setup -q -T -D -a 23
+    %setup -q -T -D -a 24
+    %setup -q -T -D -a 25
+    %setup -q -T -D -a 26
+    %setup -q -T -D -a 27
+    %setup -q -T -D -a 28
+    %setup -q -T -D -a 29
+
+%build
+
+%install
+    rm -rf $RPM_BUILD_ROOT
+
+    #   install program components
+    %{l_prefix}/bin/perl-openpkg prepare
+    %{l_prefix}/bin/perl-openpkg -d %{SOURCE0}  configure build install
+    %{l_prefix}/bin/perl-openpkg -d %{SOURCE1}  configure build install
+    %{l_prefix}/bin/perl-openpkg -d %{SOURCE2}  configure build install
+    %{l_prefix}/bin/perl-openpkg -d %{SOURCE3}  configure build install
+    %{l_prefix}/bin/perl-openpkg -d %{SOURCE4}  configure build install
+    %{l_prefix}/bin/perl-openpkg -d %{SOURCE5}  configure build install
+    %{l_prefix}/bin/perl-openpkg -d %{SOURCE6}  configure build install
+    %{l_prefix}/bin/perl-openpkg -d %{SOURCE7}  configure build install
+    %{l_prefix}/bin/perl-openpkg -d %{SOURCE8}  configure build install
+    %{l_prefix}/bin/perl-openpkg -d %{SOURCE9}  configure build install
+    %{l_prefix}/bin/perl-openpkg -d %{SOURCE10} configure build install
+    %{l_prefix}/bin/perl-openpkg -d %{SOURCE11} configure build install
+    %{l_prefix}/bin/perl-openpkg -d %{SOURCE12} configure build install
+    %{l_prefix}/bin/perl-openpkg -d %{SOURCE13} configure build install
+    %{l_prefix}/bin/perl-openpkg -d %{SOURCE14} configure build install
+    %{l_prefix}/bin/perl-openpkg -d %{SOURCE15} configure build install
+    %{l_prefix}/bin/perl-openpkg -d %{SOURCE16} configure build install
+    %{l_prefix}/bin/perl-openpkg -d %{SOURCE17} configure build install
+    %{l_prefix}/bin/perl-openpkg -d %{SOURCE18} configure build install
+    %{l_prefix}/bin/perl-openpkg -d %{SOURCE19} configure build install
+    %{l_prefix}/bin/perl-openpkg -d %{SOURCE20} configure build install
+    %{l_prefix}/bin/perl-openpkg -d %{SOURCE21} configure build install
+    %{l_prefix}/bin/perl-openpkg -d %{SOURCE22} configure build install
+    %{l_prefix}/bin/perl-openpkg -d %{SOURCE23} configure build install
+    %{l_prefix}/bin/perl-openpkg -d %{SOURCE24} configure build install
+    %{l_prefix}/bin/perl-openpkg -d %{SOURCE25} configure build install
+    %{l_prefix}/bin/perl-openpkg -d %{SOURCE26} configure build install
+    %{l_prefix}/bin/perl-openpkg -d %{SOURCE27} configure build install
+    %{l_prefix}/bin/perl-openpkg -d %{SOURCE28} configure build install
+    %{l_prefix}/bin/perl-openpkg -d %{SOURCE29} configure build install
+    %{l_prefix}/bin/perl-openpkg -F perl-openpkg-files fixate cleanup
+
+    #   install Apache configuration
+    %{l_shtool} mkdir -f -p -m 755 \
+        $RPM_BUILD_ROOT%{l_prefix}/etc/kwiki
+    %{l_shtool} install -c -m 644 %{l_value -s -a} \
+        %{SOURCE kwiki-apache.conf} \
+        $RPM_BUILD_ROOT%{l_prefix}/etc/kwiki/
+
+    #   install Kwiki state directory
+    %{l_shtool} mkdir -f -p -m 755 \
+        $RPM_BUILD_ROOT%{l_prefix}/var/kwiki
+
+    #   determine installation files
+    %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
+        %{l_files_std} `cat perl-openpkg-files` \
+        '%config %{l_prefix}/etc/kwiki/*' \
+        '%attr(-,%{l_nusr},%{l_ngrp}) %{l_prefix}/var/kwiki'
+
+%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/kwiki/kwiki-apache.conf"
+            ) | $RPM_INSTALL_PREFIX/lib/openpkg/rpmtool config \
+                    -a -i "$RPM_INSTALL_PREFIX:kwiki" $apacheconf
+        fi
+
+        #   create initial Kwiki
+        ( cd $RPM_INSTALL_PREFIX/var/kwiki || exit $?
+          $RPM_INSTALL_PREFIX/bin/kwiki -new
+          $RPM_INSTALL_PREFIX/bin/kwiki -add \
+              Kwiki::AnchorLink Kwiki::Archive Kwiki::Archive::Rcs Kwiki::Autoformat \
+              Kwiki::Base Kwiki::CGI Kwiki::CSS Kwiki::Cache Kwiki::Command \
+              Kwiki::Config Kwiki::ContentObject Kwiki::Cookie Kwiki::Diff \
+              Kwiki::Display Kwiki::Edit Kwiki::Files Kwiki::Formatter \
+              Kwiki::Formatter::Pod Kwiki::GDGraphGenerator Kwiki::GoogleLink \
+              Kwiki::Htaccess Kwiki::Hub Kwiki::Icons Kwiki::Icons::Crystal \
+              Kwiki::Icons::Gnome Kwiki::Image Kwiki::Installer Kwiki::Javascript \
+              Kwiki::MindMap Kwiki::ModPerl Kwiki::NewPage Kwiki::Notify::Mail \
+              Kwiki::PageInclude Kwiki::Pages Kwiki::ParagraphBlocks Kwiki::Plugin \
+              Kwiki::Preferences Kwiki::PreformattedBlocks Kwiki::RecentChanges \
+              Kwiki::RecentChangesRSS Kwiki::Registry Kwiki::Revisions Kwiki::Search \
+              Kwiki::ShellBlocks Kwiki::ShortcutLinks Kwiki::Status Kwiki::Template \
+              Kwiki::Template::TT2 Kwiki::Theme Kwiki::Theme::Basic Kwiki::Toolbar \
+              Kwiki::Toolbar::List Kwiki::UserName Kwiki::UserPreferences \
+              Kwiki::Users Kwiki::VimMode Kwiki::Widgets
+          $RPM_INSTALL_PREFIX/bin/htpasswd -b -c passwd admin admin
+        ) || exit $?
+
+        #   display information about steps the admin should perform next
+        ( echo "Kwiki was successfully installed. You should now start Apache with"
+          echo "  \$ $RPM_INSTALL_PREFIX/etc/rc apache start"
+        ) | %{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:kwiki" $apacheconf
+        fi
+    fi
+