##
##  kwiki.spec -- OpenPKG RPM Package Specification
##  Copyright (c) 2000-2025 OpenPKG Project <http://openpkg.org/>
##
##  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.
##

#   FIXME: rse: still some plugins are broken because they need porting to Kwiki 0.38/0.39!!

#   package versions
%define       V_perl                        5.8.6
%define       V_spoon                       0.24
%define       V_kwiki                       0.39
%define       V_kwiki_modperl               0.09
%define       V_kwiki_anchorlink            0.03
%define       V_kwiki_archive_rcs           0.16
%define       V_kwiki_archive_cvs           0.104
%define       V_kwiki_autoformat            0.03
%define       V_kwiki_cache                 0.11
%define       V_kwiki_revisions             0.15
%define       V_kwiki_diff                  0.03
%define       V_kwiki_recentchanges         0.14
%define       V_kwiki_recentchangesrss      0.07
%define       V_kwiki_search                0.12
%define       V_kwiki_gdgraphgenerator      0.04
%define       V_kwiki_googlelink            0.01
%define       V_kwiki_icons_crystal         0.12
%define       V_kwiki_icons_gnome           0.15
%define       V_kwiki_image                 0.01
%define       V_kwiki_mindmap               0.09
%define       V_kwiki_newpage               0.12
%define       V_kwiki_notify_mail           0.04
%define       V_kwiki_pageinclude           0.02
%define       V_kwiki_paragraphblocks       0.12
%define       V_kwiki_preformattedblocks    0.11
%define       V_kwiki_shellblocks           0.02
%define       V_kwiki_shortcutlinks         0.03
%define       V_kwiki_toolbar_list          0.01
%define       V_kwiki_username              0.14
%define       V_kwiki_userpreferences       0.13
%define       V_kwiki_vimmode               0.05
%define       V_kwiki_authoronlypageediting 0.01
%define       V_kwiki_breadcrumbs           0.12
%define       V_kwiki_comments              0.06
%define       V_kwiki_edit_requireusername  0.02
%define       V_kwiki_favorites             0.13
%define       V_kwiki_guestbook             0.13
%define       V_kwiki_htmlblocks            0.11
%define       V_kwiki_livesearch            0.07
%define       V_kwiki_pagetemplate          0.04
%define       V_kwiki_email                 0.02
%define       V_kwiki_formatter_pod         0.11
%define       V_kwiki_podblocks             0.11
%define       V_kwiki_scode                 0.03
%define       V_kwiki_theme_klassik         0.12
%define       V_kwiki_timezone              0.11
%define       V_kwiki_users_remote          0.04
%define       V_kwiki_users_cookie          0.01
%define       V_kwiki_pageprivacy           0.10
%define       V_kwiki_navigationtoolbar     0.02
%define       V_kwiki_configblocks          0.01
%define       V_kwiki_infobox               0.03
%define       V_kwiki_theme_columnlayout    0.08
%define       V_kwiki_theme_hlb             0.01
%define       V_kwiki_theme_tabnav          0.01
%define       V_kwiki_theme_bluepole        1.00
%define       V_kwiki_theme_greenhouse      0.03
%define       V_kwiki_theme_cpb             0.10
%define       V_kwiki_theme_justcontent     0.10
%define       V_kwiki_theme_selectable      0.10
%define       V_kwiki_foreignlinkglyphs     0.02
%define       V_kwiki_backlinks             0.10
%define       V_kwiki_fetchrss              0.08
%define       V_kwiki_cooluri               0.04
%define       V_kwiki_datedannounce         0.01
%define       V_kwiki_homepagepreference    0.10
%define       V_kwiki_pagestats             0.06
%define       V_kwiki_purple                0.04
%define       V_kwiki_test                  0.03
%define       V_kwiki_attachments           0.21
%define       V_kwiki_opensearch            0.02
%define       V_kwiki_urlblock              0.05
%define       V_kwiki_cacheddisplay         0.07
%define       V_kwiki_footnote              0.01
%define       V_kwiki_raw                   0.02
%define       V_kwiki_trackback             0.01
%define       V_kwiki_typekey               0.08
%define       V_kwiki_keywords              0.14
%define       V_kwiki_blog                  0.10
%define       V_kwiki_listpages             0.11
%define       V_kwiki_printerfriendly       0.13
%define       V_kwiki_username_cookie       0.01

#   package information
Name:         kwiki
Summary:      Kwiki Wiki Engine
URL:          http://www.kwiki.org/
Vendor:       Brian Ingerson et al.
Packager:     OpenPKG Project
Distribution: OpenPKG Community
Class:        PLUS
Group:        CMS
License:      GPL/Artistic
Version:      %{V_kwiki}
Release:      20090823

#   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-GDGraphGenerator-%{V_kwiki_gdgraphgenerator}.tar.gz
Source12:     http://www.cpan.org/modules/by-module/Kwiki/Kwiki-GoogleLink-%{V_kwiki_googlelink}.tar.gz
Source13:     http://www.cpan.org/modules/by-module/Kwiki/Kwiki-Icons-Crystal-%{V_kwiki_icons_crystal}.tar.gz
Source14:     http://www.cpan.org/modules/by-module/Kwiki/Kwiki-Icons-Gnome-%{V_kwiki_icons_gnome}.tar.gz
Source15:     http://www.cpan.org/modules/by-module/Kwiki/Kwiki-Image-%{V_kwiki_image}.tar.gz
Source16:     http://www.cpan.org/modules/by-module/Kwiki/Kwiki-MindMap-%{V_kwiki_mindmap}.tar.gz
Source17:     http://www.cpan.org/modules/by-module/Kwiki/Kwiki-ModPerl-%{V_kwiki_modperl}.tar.gz
Source18:     http://www.cpan.org/modules/by-module/Kwiki/Kwiki-NewPage-%{V_kwiki_newpage}.tar.gz
Source19:     http://www.cpan.org/modules/by-module/Kwiki/Kwiki-Notify-Mail-%{V_kwiki_notify_mail}.tar.gz
Source20:     http://www.cpan.org/modules/by-module/Kwiki/Kwiki-PageInclude-%{V_kwiki_pageinclude}.tar.gz
Source21:     http://www.cpan.org/modules/by-module/Kwiki/Kwiki-ParagraphBlocks-%{V_kwiki_paragraphblocks}.tar.gz
Source22:     http://www.cpan.org/modules/by-module/Kwiki/Kwiki-PreformattedBlocks-%{V_kwiki_preformattedblocks}.tar.gz
Source23:     http://www.cpan.org/modules/by-module/Kwiki/Kwiki-ShellBlocks-%{V_kwiki_shellblocks}.tar.gz
Source24:     http://www.cpan.org/modules/by-module/Kwiki/Kwiki-ShortcutLinks-%{V_kwiki_shortcutlinks}.tar.gz
Source25:     http://www.cpan.org/modules/by-module/Kwiki/Kwiki-Toolbar-List-%{V_kwiki_toolbar_list}.tar.gz
Source26:     http://www.cpan.org/modules/by-module/Kwiki/Kwiki-UserName-%{V_kwiki_username}.tar.gz
Source27:     http://www.cpan.org/modules/by-module/Kwiki/Kwiki-UserPreferences-%{V_kwiki_userpreferences}.tar.gz
Source28:     http://www.cpan.org/modules/by-module/Kwiki/Kwiki-VimMode-%{V_kwiki_vimmode}.tar.gz
Source29:     http://www.cpan.org/modules/by-module/Kwiki/Kwiki-Archive-Cvs-%{V_kwiki_archive_cvs}.tar.gz
Source30:     http://www.cpan.org/modules/by-module/Kwiki/Kwiki-AuthorOnlyPageEditing-%{V_kwiki_authoronlypageediting}.tar.gz
Source31:     http://www.cpan.org/modules/by-module/Kwiki/Kwiki-BreadCrumbs-%{V_kwiki_breadcrumbs}.tar.gz
Source32:     http://www.cpan.org/modules/by-module/Kwiki/Kwiki-Comments-%{V_kwiki_comments}.tar.gz
Source33:     http://www.cpan.org/modules/by-module/Kwiki/Kwiki-Edit-RequireUserName-%{V_kwiki_edit_requireusername}.tar.gz
Source34:     http://www.cpan.org/modules/by-module/Kwiki/Kwiki-Favorites-%{V_kwiki_favorites}.tar.gz
Source35:     http://www.cpan.org/modules/by-module/Kwiki/Kwiki-GuestBook-%{V_kwiki_guestbook}.tar.gz
Source36:     http://www.cpan.org/modules/by-module/Kwiki/Kwiki-HtmlBlocks-%{V_kwiki_htmlblocks}.tar.gz
Source37:     http://www.cpan.org/modules/by-module/Kwiki/Kwiki-LiveSearch-%{V_kwiki_livesearch}.tar.gz
Source38:     http://www.cpan.org/modules/by-module/Kwiki/Kwiki-PageTemplate-%{V_kwiki_pagetemplate}.tar.gz
Source39:     http://www.cpan.org/modules/by-module/Kwiki/Kwiki-Email-%{V_kwiki_email}.tar.gz
Source40:     http://www.cpan.org/modules/by-module/Kwiki/Kwiki-Formatter-Pod-%{V_kwiki_formatter_pod}.tar.gz
Source41:     http://www.cpan.org/modules/by-module/Kwiki/Kwiki-PodBlocks-%{V_kwiki_podblocks}.tar.gz
Source42:     http://www.cpan.org/modules/by-module/Kwiki/Kwiki-Scode-%{V_kwiki_scode}.tar.gz
Source43:     http://www.cpan.org/modules/by-module/Kwiki/Kwiki-Theme-Klassik-%{V_kwiki_theme_klassik}.tar.gz
Source44:     http://www.cpan.org/modules/by-module/Kwiki/Kwiki-TimeZone-%{V_kwiki_timezone}.tar.gz
Source45:     http://www.cpan.org/modules/by-module/Kwiki/Kwiki-Users-Remote-%{V_kwiki_users_remote}.tar.gz
Source46:     http://www.cpan.org/modules/by-module/Kwiki/Kwiki-PagePrivacy-%{V_kwiki_pageprivacy}.tar.gz
Source47:     http://www.cpan.org/modules/by-module/Kwiki/Kwiki-NavigationToolbar-%{V_kwiki_navigationtoolbar}.tar.gz
Source48:     http://www.cpan.org/authors/id/G/GU/GUGOD/Kwiki-ConfigBlocks-%{V_kwiki_configblocks}.tar.gz
Source49:     http://www.cpan.org/authors/id/G/GU/GUGOD/Kwiki-Infobox-%{V_kwiki_infobox}.tar.gz
Source50:     http://www.cpan.org/modules/by-module/Kwiki/Kwiki-Theme-ColumnLayout-%{V_kwiki_theme_columnlayout}.tar.gz
Source51:     http://www.cpan.org/modules/by-module/Kwiki/Kwiki-Theme-HLB-%{V_kwiki_theme_hlb}.tar.gz
Source52:     http://www.cpan.org/modules/by-module/Kwiki/Kwiki-Theme-TabNav-%{V_kwiki_theme_tabnav}.tar.gz
Source53:     http://www.cpan.org/modules/by-module/Kwiki/Kwiki-ForeignLinkGlyphs-%{V_kwiki_foreignlinkglyphs}.tar.gz
Source54:     http://www.cpan.org/modules/by-module/Kwiki/Kwiki-Backlinks-%{V_kwiki_backlinks}.tar.gz
Source55:     http://www.cpan.org/modules/by-module/Kwiki/Kwiki-FetchRSS-%{V_kwiki_fetchrss}.tar.gz
Source56:     http://www.cpan.org/modules/by-module/Kwiki/Kwiki-Theme-Bluepole-%{V_kwiki_theme_bluepole}.tar.gz
Source57:     http://www.cpan.org/modules/by-module/Kwiki/Kwiki-CoolURI-%{V_kwiki_cooluri}.tar.gz
Source58:     http://www.cpan.org/modules/by-module/Kwiki/Kwiki-DatedAnnounce-%{V_kwiki_datedannounce}.tar.gz
Source59:     http://www.cpan.org/modules/by-module/Kwiki/Kwiki-HomePagePreference-%{V_kwiki_homepagepreference}.tar.gz
Source60:     http://www.cpan.org/modules/by-module/Kwiki/Kwiki-PageStats-%{V_kwiki_pagestats}.tar.gz
Source61:     http://www.cpan.org/modules/by-module/Kwiki/Kwiki-Purple-%{V_kwiki_purple}.tar.gz
Source62:     http://www.cpan.org/modules/by-module/Kwiki/Kwiki-Test-%{V_kwiki_test}.tar.gz
Source63:     http://www.cpan.org/modules/by-module/Kwiki/Kwiki-Attachments-%{V_kwiki_attachments}.tar.gz
Source64:     http://www.cpan.org/modules/by-module/Kwiki/Kwiki-OpenSearch-%{V_kwiki_opensearch}.tar.gz
Source65:     http://www.cpan.org/modules/by-module/Kwiki/Kwiki-URLBlock-%{V_kwiki_urlblock}.tar.gz
Source66:     http://www.cpan.org/modules/by-module/Kwiki/Kwiki-CachedDisplay-%{V_kwiki_cacheddisplay}.tar.gz
Source67:     http://www.cpan.org/modules/by-module/Kwiki/Kwiki-Footnote-%{V_kwiki_footnote}.tar.gz
Source68:     http://www.cpan.org/modules/by-module/Kwiki/Kwiki-Raw-%{V_kwiki_raw}.tar.gz
Source69:     http://www.cpan.org/modules/by-module/Kwiki/Kwiki-Trackback-%{V_kwiki_trackback}.tar.gz
Source70:     http://www.cpan.org/modules/by-module/Kwiki/Kwiki-TypeKey-%{V_kwiki_typekey}.tar.gz
Source71:     http://www.cpan.org/modules/by-module/Kwiki/Kwiki-Theme-GreenHouse-%{V_kwiki_theme_greenhouse}.tar.gz
Source72:     http://www.cpan.org/modules/by-module/Kwiki/Kwiki-Users-Cookie-%{V_kwiki_users_cookie}.tar.gz
Source73:     http://www.cpan.org/modules/by-module/Kwiki/Kwiki-Theme-CPB-%{V_kwiki_theme_cpb}.tar.gz
Source74:     http://www.cpan.org/modules/by-module/Kwiki/Kwiki-Theme-JustContent-%{V_kwiki_theme_justcontent}.tar.gz
Source75:     http://www.cpan.org/modules/by-module/Kwiki/Kwiki-Theme-Selectable-%{V_kwiki_theme_selectable}.tar.gz
Source76:     http://www.cpan.org/modules/by-module/Kwiki/Kwiki-Keywords-%{V_kwiki_keywords}.tar.gz
Source77:     http://www.cpan.org/modules/by-module/Kwiki/Kwiki-Blog-%{V_kwiki_blog}.tar.gz
Source78:     http://www.cpan.org/modules/by-module/Kwiki/Kwiki-ListPages-%{V_kwiki_listpages}.tar.gz
Source79:     http://www.cpan.org/modules/by-module/Kwiki/Kwiki-PrinterFriendly-%{V_kwiki_printerfriendly}.tar.gz
Source80:     http://www.cpan.org/modules/by-module/Kwiki/Kwiki-UserName-Cookie-%{V_kwiki_username_cookie}.tar.gz
Source100:    kwiki-apache.conf
Source101:    kwiki-plugins.txt
Source102:    kwiki-rules.wiki
Source103:    kwiki-sandbox.wiki
Source104:    kwiki-openpkg.pm
Source105:    kwiki-spamwhitelist.pm
Patch0:       kwiki.patch

#   build information
BuildPreReq:  OpenPKG, openpkg >= 20160101, perl, perl-openpkg
PreReq:       OpenPKG, openpkg >= 20160101, perl, apache, rcs
BuildPreReq:  perl-sys >= %{V_perl}-20050121, perl-parse >= %{V_perl}-20050131
PreReq:       perl-sys >= %{V_perl}-20050121, perl-parse >= %{V_perl}-20050131
BuildPreReq:  perl-text, perl-mail, perl-vcs, perl-gd, perl-xml
PreReq:       perl-text, perl-mail, perl-vcs, perl-gd, perl-xml

%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-Archive-Cvs = {
        version   = %{V_kwiki_archive_cvs}
        url       = http://www.cpan.org/modules/by-module/Kwiki/
        regex     = Kwiki-Archive-Cvs-(__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
    }
    prog kwiki:Kwiki-Revisions = {
        version   = %{V_kwiki_revisions}
        url       = http://www.cpan.org/modules/by-module/Kwiki/
        regex     = Kwiki-Revisions-(__VER__)\.tar\.gz
    }
    prog kwiki:Kwiki-Diff = {
        version   = %{V_kwiki_diff}
        url       = http://www.cpan.org/modules/by-module/Kwiki/
        regex     = Kwiki-Diff-(__VER__)\.tar\.gz
    }
    prog kwiki:Kwiki-RecentChanges = {
        version   = %{V_kwiki_recentchanges}
        url       = http://www.cpan.org/modules/by-module/Kwiki/
        regex     = Kwiki-RecentChanges-(__VER__)\.tar\.gz
    }
    prog kwiki:Kwiki-RecentChangesRSS = {
        version   = %{V_kwiki_recentchangesrss}
        url       = http://www.cpan.org/modules/by-module/Kwiki/
        regex     = Kwiki-RecentChangesRSS-(__VER__)\.tar\.gz
    }
    prog kwiki:Kwiki-Search = {
        version   = %{V_kwiki_search}
        url       = http://www.cpan.org/modules/by-module/Kwiki/
        regex     = Kwiki-Search-(__VER__)\.tar\.gz
    }
    prog kwiki:Kwiki-GDGraphGenerator = {
        version   = %{V_kwiki_gdgraphgenerator}
        url       = http://www.cpan.org/modules/by-module/Kwiki/
        regex     = Kwiki-GDGraphGenerator-(__VER__)\.tar\.gz
    }
    prog kwiki:Kwiki-GoogleLink = {
        version   = %{V_kwiki_googlelink}
        url       = http://www.cpan.org/modules/by-module/Kwiki/
        regex     = Kwiki-GoogleLink-(__VER__)\.tar\.gz
    }
    prog kwiki:Kwiki-Icons-Crystal = {
        version   = %{V_kwiki_icons_crystal}
        url       = http://www.cpan.org/modules/by-module/Kwiki/
        regex     = Kwiki-Icons-Crystal-(__VER__)\.tar\.gz
    }
    prog kwiki:Kwiki-Icons-Gnome = {
        version   = %{V_kwiki_icons_gnome}
        url       = http://www.cpan.org/modules/by-module/Kwiki/
        regex     = Kwiki-Icons-Gnome-(__VER__)\.tar\.gz
    }
    prog kwiki:Kwiki-Image = {
        version   = %{V_kwiki_image}
        url       = http://www.cpan.org/modules/by-module/Kwiki/
        regex     = Kwiki-Image-(__VER__)\.tar\.gz
    }
    prog kwiki:Kwiki-MindMap = {
        version   = %{V_kwiki_mindmap}
        url       = http://www.cpan.org/modules/by-module/Kwiki/
        regex     = Kwiki-MindMap-(__VER__)\.tar\.gz
    }
    prog kwiki:Kwiki-ModPerl = {
        version   = %{V_kwiki_modperl}
        url       = http://www.cpan.org/modules/by-module/Kwiki/
        regex     = Kwiki-ModPerl-(__VER__)\.tar\.gz
    }
    prog kwiki:Kwiki-NewPage = {
        version   = %{V_kwiki_newpage}
        url       = http://www.cpan.org/modules/by-module/Kwiki/
        regex     = Kwiki-NewPage-(__VER__)\.tar\.gz
    }
    prog kwiki:Kwiki-Notify-Mail = {
        version   = %{V_kwiki_notify_mail}
        url       = http://www.cpan.org/modules/by-module/Kwiki/
        regex     = Kwiki-Notify-Mail-(__VER__)\.tar\.gz
    }
    prog kwiki:Kwiki-PageInclude = {
        version   = %{V_kwiki_pageinclude}
        url       = http://www.cpan.org/modules/by-module/Kwiki/
        regex     = Kwiki-PageInclude-(__VER__)\.tar\.gz
    }
    prog kwiki:Kwiki-ParagraphBlocks = {
        version   = %{V_kwiki_paragraphblocks}
        url       = http://www.cpan.org/modules/by-module/Kwiki/
        regex     = Kwiki-ParagraphBlocks-(__VER__)\.tar\.gz
    }
    prog kwiki:Kwiki-PreformattedBlocks = {
        version   = %{V_kwiki_preformattedblocks}
        url       = http://www.cpan.org/modules/by-module/Kwiki/
        regex     = Kwiki-PreformattedBlocks-(__VER__)\.tar\.gz
    }
    prog kwiki:Kwiki-ShellBlocks = {
        version   = %{V_kwiki_shellblocks}
        url       = http://www.cpan.org/modules/by-module/Kwiki/
        regex     = Kwiki-ShellBlocks-(__VER__)\.tar\.gz
    }
    prog kwiki:Kwiki-ShortcutLinks = {
        version   = %{V_kwiki_shortcutlinks}
        url       = http://www.cpan.org/modules/by-module/Kwiki/
        regex     = Kwiki-ShortcutLinks-(__VER__)\.tar\.gz
    }
    prog kwiki:Kwiki-Toolbar-List = {
        version   = %{V_kwiki_toolbar_list}
        url       = http://www.cpan.org/modules/by-module/Kwiki/
        regex     = Kwiki-Toolbar-List-(__VER__)\.tar\.gz
    }
    prog kwiki:Kwiki-UserName = {
        version   = %{V_kwiki_username}
        url       = http://www.cpan.org/modules/by-module/Kwiki/
        regex     = Kwiki-UserName-(__VER__)\.tar\.gz
    }
    prog kwiki:Kwiki-UserPreferences = {
        version   = %{V_kwiki_userpreferences}
        url       = http://www.cpan.org/modules/by-module/Kwiki/
        regex     = Kwiki-UserPreferences-(__VER__)\.tar\.gz
    }
    prog kwiki:Kwiki-VimMode = {
        version   = %{V_kwiki_vimmode}
        url       = http://www.cpan.org/modules/by-module/Kwiki/
        regex     = Kwiki-VimMode-(__VER__)\.tar\.gz
    }
    prog kwiki:Kwiki-AuthorOnlyPageEditing = {
        version   = %{V_kwiki_authoronlypageediting}
        url       = http://www.cpan.org/modules/by-module/Kwiki/
        regex     = Kwiki-AuthorOnlyPageEditing-(__VER__)\.tar\.gz
    }
    prog kwiki:Kwiki-BreadCrumbs = {
        version   = %{V_kwiki_breadcrumbs}
        url       = http://www.cpan.org/modules/by-module/Kwiki/
        regex     = Kwiki-BreadCrumbs-(__VER__)\.tar\.gz
    }
    prog kwiki:Kwiki-Comments = {
        version   = %{V_kwiki_comments}
        url       = http://www.cpan.org/modules/by-module/Kwiki/
        regex     = Kwiki-Comments-(__VER__)\.tar\.gz
    }
    prog kwiki:Kwiki-Edit-RequireUserName = {
        version   = %{V_kwiki_edit_requireusername}
        url       = http://www.cpan.org/modules/by-module/Kwiki/
        regex     = Kwiki-Edit-RequireUserName-(__VER__)\.tar\.gz
    }
    prog kwiki:Kwiki-Favorites = {
        version   = %{V_kwiki_favorites}
        url       = http://www.cpan.org/modules/by-module/Kwiki/
        regex     = Kwiki-Favorites-(__VER__)\.tar\.gz
    }
    prog kwiki:Kwiki-GuestBook = {
        version   = %{V_kwiki_guestbook}
        url       = http://www.cpan.org/modules/by-module/Kwiki/
        regex     = Kwiki-GuestBook-(__VER__)\.tar\.gz
    }
    prog kwiki:Kwiki-HtmlBlocks = {
        version   = %{V_kwiki_htmlblocks}
        url       = http://www.cpan.org/modules/by-module/Kwiki/
        regex     = Kwiki-HtmlBlocks-(__VER__)\.tar\.gz
    }
    prog kwiki:Kwiki-LiveSearch = {
        version   = %{V_kwiki_livesearch}
        url       = http://www.cpan.org/modules/by-module/Kwiki/
        regex     = Kwiki-LiveSearch-(__VER__)\.tar\.gz
    }
    prog kwiki:Kwiki-PageTemplate = {
        version   = %{V_kwiki_pagetemplate}
        url       = http://www.cpan.org/modules/by-module/Kwiki/
        regex     = Kwiki-PageTemplate-(__VER__)\.tar\.gz
    }
    prog kwiki:Kwiki-Email = {
        version   = %{V_kwiki_email}
        url       = http://www.cpan.org/modules/by-module/Kwiki/
        regex     = Kwiki-Email-(__VER__)\.tar\.gz
    }
    prog kwiki:Kwiki-Formatted-Pod = {
        version   = %{V_kwiki_formatter_pod}
        url       = http://www.cpan.org/modules/by-module/Kwiki/
        regex     = Kwiki-Formatter-Pod-(__VER__)\.tar\.gz
    }
    prog kwiki:Kwiki-PodBlocks = {
        version   = %{V_kwiki_podblocks}
        url       = http://www.cpan.org/modules/by-module/Kwiki/
        regex     = Kwiki-PodBlocks-(__VER__)\.tar\.gz
    }
    prog kwiki:Kwiki-Scode = {
        version   = %{V_kwiki_scode}
        url       = http://www.cpan.org/modules/by-module/Kwiki/
        regex     = Kwiki-Scode-(__VER__)\.tar\.gz
    }
    prog kwiki:Kwiki-Theme-Klassik = {
        version   = %{V_kwiki_theme_klassik}
        url       = http://www.cpan.org/modules/by-module/Kwiki/
        regex     = Kwiki-Theme-Klassik-(__VER__)\.tar\.gz
    }
    prog kwiki:Kwiki-TimeZone = {
        version   = %{V_kwiki_timezone}
        url       = http://www.cpan.org/modules/by-module/Kwiki/
        regex     = Kwiki-TimeZone-(__VER__)\.tar\.gz
    }
    prog kwiki:Kwiki-Users-Remote = {
        version   = %{V_kwiki_users_remote}
        url       = http://www.cpan.org/modules/by-module/Kwiki/
        regex     = Kwiki-Users-Remote-(__VER__)\.tar\.gz
    }
    prog kwiki:Kwiki-Users-Cookie = {
        version   = %{V_kwiki_users_cookie}
        url       = http://www.cpan.org/modules/by-module/Kwiki/
        regex     = Kwiki-Users-Cookie-(__VER__)\.tar\.gz
    }
    prog kwiki:Kwiki-PagePrivacy = {
        version   = %{V_kwiki_pageprivacy}
        url       = http://www.cpan.org/modules/by-module/Kwiki/
        regex     = Kwiki-PagePrivacy-(__VER__)\.tar\.gz
    }
    prog kwiki:Kwiki-NavigationToolbar = {
        version   = %{V_kwiki_navigationtoolbar}
        url       = http://www.cpan.org/modules/by-module/Kwiki/
        regex     = Kwiki-NavigationToolbar-(__VER__)\.tar\.gz
    }
    prog kwiki:Kwiki-Theme-ColumnLayout = {
        version   = %{V_kwiki_theme_columnlayout}
        url       = http://www.cpan.org/modules/by-module/Kwiki/
        regex     = Kwiki-Theme-ColumnLayout-(__VER__)\.tar\.gz
    }
    prog kwiki:Kwiki-Theme-HLB = {
        version   = %{V_kwiki_theme_hlb}
        url       = http://www.cpan.org/modules/by-module/Kwiki/
        regex     = Kwiki-Theme-HLB-(__VER__)\.tar\.gz
    }
    prog kwiki:Kwiki-Theme-TabNav = {
        version   = %{V_kwiki_theme_tabnav}
        url       = http://www.cpan.org/modules/by-module/Kwiki/
        regex     = Kwiki-Theme-TabNav-(__VER__)\.tar\.gz
    }
    prog kwiki:Kwiki-Theme-CPB = {
        version   = %{V_kwiki_theme_cpb}
        url       = http://www.cpan.org/modules/by-module/Kwiki/
        regex     = Kwiki-Theme-CPB-(__VER__)\.tar\.gz
    }
    prog kwiki:Kwiki-Theme-JustContent = {
        version   = %{V_kwiki_theme_justcontent}
        url       = http://www.cpan.org/modules/by-module/Kwiki/
        regex     = Kwiki-Theme-JustContent-(__VER__)\.tar\.gz
    }
    prog kwiki:Kwiki-Theme-Selectable = {
        version   = %{V_kwiki_theme_selectable}
        url       = http://www.cpan.org/modules/by-module/Kwiki/
        regex     = Kwiki-Theme-Selectable-(__VER__)\.tar\.gz
    }
    prog kwiki:Kwiki-ConfigBlocks = {
        version   = %{V_kwiki_configblocks}
        url       = http://www.cpan.org/authors/id/G/GU/GUGOD/
        regex     = Kwiki-ConfigBlocks-(__VER__)\.tar\.gz
    }
    prog kwiki:Kwiki-Infobox = {
        version   = %{V_kwiki_infobox}
        url       = http://www.cpan.org/authors/id/G/GU/GUGOD/
        regex     = Kwiki-Infobox-(__VER__)\.tar\.gz
    }
    prog kwiki:Kwiki-ForeignLinkGlyphs = {
        version   = %{V_kwiki_foreignlinkglyphs}
        url       = http://www.cpan.org/modules/by-module/Kwiki/
        regex     = Kwiki-ForeignLinkGlyphs-(__VER__)\.tar\.gz
    }
    prog kwiki:Kwiki-Backlinks = {
        version   = %{V_kwiki_backlinks}
        url       = http://www.cpan.org/modules/by-module/Kwiki/
        regex     = Kwiki-Backlinks-(__VER__)\.tar\.gz
    }
    prog kwiki:Kwiki-FetchRSS = {
        version   = %{V_kwiki_fetchrss}
        url       = http://www.cpan.org/modules/by-module/Kwiki/
        regex     = Kwiki-FetchRSS-(__VER__)\.tar\.gz
    }
    prog kwiki:Kwiki-Theme-Bluepole = {
        version   = %{V_kwiki_theme_bluepole}
        url       = http://www.cpan.org/modules/by-module/Kwiki/
        regex     = Kwiki-Theme-Bluepole-(__VER__)\.tar\.gz
    }
    prog kwiki:Kwiki-Theme-GreenHouse = {
        version   = %{V_kwiki_theme_greenhouse}
        url       = http://www.cpan.org/modules/by-module/Kwiki/
        regex     = Kwiki-Theme-GreenHouse-(__VER__)\.tar\.gz
    }
    prog kwiki:Kwiki-CoolURI = {
        version   = %{V_kwiki_cooluri}
        url       = http://www.cpan.org/modules/by-module/Kwiki/
        regex     = Kwiki-CoolURI-(__VER__)\.tar\.gz
    }
    prog kwiki:Kwiki-DatedAnnounce = {
        version   = %{V_kwiki_datedannounce}
        url       = http://www.cpan.org/modules/by-module/Kwiki/
        regex     = Kwiki-DatedAnnounce-(__VER__)\.tar\.gz
    }
    prog kwiki:Kwiki-HomePagePreference = {
        version   = %{V_kwiki_homepagepreference}
        url       = http://www.cpan.org/modules/by-module/Kwiki/
        regex     = Kwiki-HomePagePreference-(__VER__)\.tar\.gz
    }
    prog kwiki:Kwiki-PageStats = {
        version   = %{V_kwiki_pagestats}
        url       = http://www.cpan.org/modules/by-module/Kwiki/
        regex     = Kwiki-PageStats-(__VER__)\.tar\.gz
    }
    prog kwiki:Kwiki-Purple = {
        version   = %{V_kwiki_purple}
        url       = http://www.cpan.org/modules/by-module/Kwiki/
        regex     = Kwiki-Purple-(__VER__)\.tar\.gz
    }
    prog kwiki:Kwiki-Test = {
        version   = %{V_kwiki_test}
        url       = http://www.cpan.org/modules/by-module/Kwiki/
        regex     = Kwiki-Test-(__VER__)\.tar\.gz
    }
    prog kwiki:Kwiki-Attachments = {
        version   = %{V_kwiki_attachments}
        url       = http://www.cpan.org/modules/by-module/Kwiki/
        regex     = Kwiki-Attachments-(__VER__)\.tar\.gz
    }
    prog kwiki:Kwiki-OpenSearch = {
        version   = %{V_kwiki_opensearch}
        url       = http://www.cpan.org/modules/by-module/Kwiki/
        regex     = Kwiki-OpenSearch-(__VER__)\.tar\.gz
    }
    prog kwiki:Kwiki-URLBlock = {
        version   = %{V_kwiki_urlblock}
        url       = http://www.cpan.org/modules/by-module/Kwiki/
        regex     = Kwiki-URLBlock-(__VER__)\.tar\.gz
    }
    prog kwiki:Kwiki-CachedDisplay = {
        version   = %{V_kwiki_cacheddisplay}
        url       = http://www.cpan.org/modules/by-module/Kwiki/
        regex     = Kwiki-CachedDisplay-(__VER__)\.tar\.gz
    }
    prog kwiki:Kwiki-Footnote = {
        version   = %{V_kwiki_footnote}
        url       = http://www.cpan.org/modules/by-module/Kwiki/
        regex     = Kwiki-Footnote-(__VER__)\.tar\.gz
    }
    prog kwiki:Kwiki-Raw = {
        version   = %{V_kwiki_raw}
        url       = http://www.cpan.org/modules/by-module/Kwiki/
        regex     = Kwiki-Raw-(__VER__)\.tar\.gz
    }
    prog kwiki:Kwiki-Trackback = {
        version   = %{V_kwiki_trackback}
        url       = http://www.cpan.org/modules/by-module/Kwiki/
        regex     = Kwiki-Trackback-(__VER__)\.tar\.gz
    }
    prog kwiki:Kwiki-TypeKey = {
        version   = %{V_kwiki_typekey}
        url       = http://www.cpan.org/modules/by-module/Kwiki/
        regex     = Kwiki-TypeKey-(__VER__)\.tar\.gz
    }
    prog kwiki:Kwiki-Keywords = {
        version   = %{V_kwiki_keywords}
        url       = http://www.cpan.org/modules/by-module/Kwiki/
        regex     = Kwiki-Keywords-(__VER__)\.tar\.gz
    }
    prog kwiki:Kwiki-Blog = {
        version   = %{V_kwiki_blog}
        url       = http://www.cpan.org/modules/by-module/Kwiki/
        regex     = Kwiki-Blog-(__VER__)\.tar\.gz
    }
    prog kwiki:Kwiki-ListPages = {
        version   = %{V_kwiki_listpages}
        url       = http://www.cpan.org/modules/by-module/Kwiki/
        regex     = Kwiki-ListPages-(__VER__)\.tar\.gz
    }
    prog kwiki:Kwiki-PrinterFriendly = {
        version   = %{V_kwiki_printerfriendly}
        url       = http://www.cpan.org/modules/by-module/Kwiki/
        regex     = Kwiki-PrinterFriendly-(__VER__)\.tar\.gz
    }
    prog kwiki:Kwiki-UserName-Cookie = {
        version   = %{V_kwiki_username_cookie}
        url       = http://www.cpan.org/modules/by-module/Kwiki/
        regex     = Kwiki-UserName-Cookie-(__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
    %setup -q -T -D -a 30
    %setup -q -T -D -a 31
    %setup -q -T -D -a 32
    %setup -q -T -D -a 33
    %setup -q -T -D -a 34
    %setup -q -T -D -a 35
    %setup -q -T -D -a 36
    %setup -q -T -D -a 37
    %setup -q -T -D -a 38
    %setup -q -T -D -a 39
    %setup -q -T -D -a 40
    %setup -q -T -D -a 41
    %setup -q -T -D -a 42
    %setup -q -T -D -a 43
    %setup -q -T -D -a 44
    %setup -q -T -D -a 45
    %setup -q -T -D -a 46
    %setup -q -T -D -a 47
    %setup -q -T -D -a 48
    %setup -q -T -D -a 49
    %setup -q -T -D -a 50
    %setup -q -T -D -a 51
    %setup -q -T -D -a 52
    %setup -q -T -D -a 53
    %setup -q -T -D -a 54
    %setup -q -T -D -a 55
    %setup -q -T -D -a 56
    %setup -q -T -D -a 57
    %setup -q -T -D -a 58
    %setup -q -T -D -a 59
    %setup -q -T -D -a 60
    %setup -q -T -D -a 61
    %setup -q -T -D -a 62
    %setup -q -T -D -a 63
    %setup -q -T -D -a 64
    %setup -q -T -D -a 65
    %setup -q -T -D -a 66
    %setup -q -T -D -a 67
    %setup -q -T -D -a 68
    %setup -q -T -D -a 69
    %setup -q -T -D -a 70
    %setup -q -T -D -a 71
    %setup -q -T -D -a 72
    %setup -q -T -D -a 73
    %setup -q -T -D -a 74
    %setup -q -T -D -a 75
    %setup -q -T -D -a 76
    %setup -q -T -D -a 77
    %setup -q -T -D -a 78
    %setup -q -T -D -a 79
    %setup -q -T -D -a 80
    sed <%{PATCH0} -e 's;@l_prefix@;%{l_prefix};g' | %{l_patch} -p0 -b

%build

%install
    #   prepare installation
    %{l_prefix}/bin/perl-openpkg prepare

    #   install Kwiki components
    %{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 -d %{SOURCE30} configure build install
    %{l_prefix}/bin/perl-openpkg -d %{SOURCE31} configure build install
    %{l_prefix}/bin/perl-openpkg -d %{SOURCE32} configure build install
    %{l_prefix}/bin/perl-openpkg -d %{SOURCE33} configure build install
    %{l_prefix}/bin/perl-openpkg -d %{SOURCE34} configure build install
    %{l_prefix}/bin/perl-openpkg -d %{SOURCE35} configure build install
    %{l_prefix}/bin/perl-openpkg -d %{SOURCE36} configure build install
    %{l_prefix}/bin/perl-openpkg -d %{SOURCE37} configure build install
    %{l_prefix}/bin/perl-openpkg -d %{SOURCE38} configure build install
    %{l_prefix}/bin/perl-openpkg -d %{SOURCE39} configure build install
    %{l_prefix}/bin/perl-openpkg -d %{SOURCE40} configure build install
    %{l_prefix}/bin/perl-openpkg -d %{SOURCE41} configure build install
    %{l_prefix}/bin/perl-openpkg -d %{SOURCE42} configure build install
    %{l_prefix}/bin/perl-openpkg -d %{SOURCE43} configure build install
    %{l_prefix}/bin/perl-openpkg -d %{SOURCE44} configure build install
    %{l_prefix}/bin/perl-openpkg -d %{SOURCE45} configure build install
    %{l_prefix}/bin/perl-openpkg -d %{SOURCE46} configure build install
    %{l_prefix}/bin/perl-openpkg -d %{SOURCE47} configure build install
    %{l_prefix}/bin/perl-openpkg -d %{SOURCE48} configure build install
    %{l_prefix}/bin/perl-openpkg -d %{SOURCE49} configure build install
    %{l_prefix}/bin/perl-openpkg -d %{SOURCE50} configure build install
    %{l_prefix}/bin/perl-openpkg -d %{SOURCE51} configure build install
    %{l_prefix}/bin/perl-openpkg -d %{SOURCE52} configure build install
    %{l_prefix}/bin/perl-openpkg -d %{SOURCE53} configure build install
    %{l_prefix}/bin/perl-openpkg -d %{SOURCE54} configure build install
    %{l_prefix}/bin/perl-openpkg -d %{SOURCE55} configure build install
    %{l_prefix}/bin/perl-openpkg -d %{SOURCE56} configure build install
    %{l_prefix}/bin/perl-openpkg -d %{SOURCE57} configure build install
    %{l_prefix}/bin/perl-openpkg -d %{SOURCE58} configure build install
    %{l_prefix}/bin/perl-openpkg -d %{SOURCE59} configure build install
    %{l_prefix}/bin/perl-openpkg -d %{SOURCE60} configure build install
    %{l_prefix}/bin/perl-openpkg -d %{SOURCE61} configure build install
    %{l_prefix}/bin/perl-openpkg -d %{SOURCE62} configure build install
    %{l_prefix}/bin/perl-openpkg -d %{SOURCE63} configure build install
    %{l_prefix}/bin/perl-openpkg -d %{SOURCE64} configure build install
    %{l_prefix}/bin/perl-openpkg -d %{SOURCE65} configure build install
    %{l_prefix}/bin/perl-openpkg -d %{SOURCE66} configure build install
    %{l_prefix}/bin/perl-openpkg -d %{SOURCE67} configure build install
    %{l_prefix}/bin/perl-openpkg -d %{SOURCE68} configure build install
    %{l_prefix}/bin/perl-openpkg -d %{SOURCE69} configure build install
    %{l_prefix}/bin/perl-openpkg -d %{SOURCE70} configure build install
    %{l_prefix}/bin/perl-openpkg -d %{SOURCE71} configure build install
    %{l_prefix}/bin/perl-openpkg -d %{SOURCE72} configure build install
    %{l_prefix}/bin/perl-openpkg -d %{SOURCE73} configure build install
    %{l_prefix}/bin/perl-openpkg -d %{SOURCE74} configure build install
    %{l_prefix}/bin/perl-openpkg -d %{SOURCE75} configure build install
    %{l_prefix}/bin/perl-openpkg -d %{SOURCE76} configure build install
    %{l_prefix}/bin/perl-openpkg -d %{SOURCE77} configure build install
    %{l_prefix}/bin/perl-openpkg -d %{SOURCE78} configure build install
    %{l_prefix}/bin/perl-openpkg -d %{SOURCE79} configure build install
    %{l_prefix}/bin/perl-openpkg -d %{SOURCE80} configure build install

    #   manually install OpenPKG Kwiki theme
    mkdir Kwiki-Theme-OpenPKG
    ( echo "use ExtUtils::MakeMaker;"
      echo "WriteMakefile("
      echo "    NAME         => 'Kwiki::Theme::OpenPKG',"
      echo "    VERSION_FROM => 'OpenPKG.pm',"
      echo "    NO_META      => 1,"
      echo ");"
    ) >Kwiki-Theme-OpenPKG/Makefile.PL
    cp %{SOURCE kwiki-openpkg.pm} Kwiki-Theme-OpenPKG/OpenPKG.pm
    %{l_prefix}/bin/perl-openpkg -d Kwiki-Theme-OpenPKG configure build install

    #   manually install Anti-Spam extensions
    mkdir Kwiki-SpamWhitelist
    ( echo "use ExtUtils::MakeMaker;"
      echo "WriteMakefile("
      echo "    NAME         => 'Kwiki::SpamWhitelist',"
      echo "    VERSION_FROM => 'SpamWhitelist.pm',"
      echo "    NO_META      => 1,"
      echo ");"
    ) >Kwiki-SpamWhitelist/Makefile.PL
    cp %{SOURCE kwiki-spamwhitelist.pm} Kwiki-SpamWhitelist/SpamWhitelist.pm
    %{l_prefix}/bin/perl-openpkg -d Kwiki-SpamWhitelist configure build install

    #   finalize Perl module installation
    %{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 administration helper script
    ( echo "#!/bin/sh"
      echo "cd %{l_prefix}/var/kwiki && \\%nil"
      echo "%{l_prefix}/bin/kwiki -update_all && \\%nil"
      echo "chown -R %{l_nusr}:%{l_ngrp} %{l_prefix}/var/kwiki/*"
    ) >kwiki-update
    %{l_shtool} install -c -m 755 \
        -e 's; $;;' \
        kwiki-update $RPM_BUILD_ROOT%{l_prefix}/bin/

    #   install template files
    %{l_shtool} mkdir -f -p -m 755 \
        $RPM_BUILD_ROOT%{l_prefix}/share/kwiki
    %{l_shtool} install -c -m 644 %{l_value -s -a} \
        %{SOURCE kwiki-plugins.txt} %{SOURCE kwiki-rules.wiki} %{SOURCE kwiki-sandbox.wiki} \
        $RPM_BUILD_ROOT%{l_prefix}/share/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

%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 $?
          echo "++ Generating new standard Kwiki in $RPM_INSTALL_PREFIX/var/kwiki/"
          $RPM_INSTALL_PREFIX/bin/kwiki -quiet -new
          echo "++ Pre-configuring Kwiki in $RPM_INSTALL_PREFIX/var/kwiki/"
          cp $RPM_INSTALL_PREFIX/share/kwiki/kwiki-plugins.txt \
             $RPM_INSTALL_PREFIX/var/kwiki/plugins
          cp $RPM_INSTALL_PREFIX/share/kwiki/kwiki-rules.wiki \
             $RPM_INSTALL_PREFIX/var/kwiki/database/KwikiFormattingRules
          cp $RPM_INSTALL_PREFIX/share/kwiki/kwiki-sandbox.wiki \
             $RPM_INSTALL_PREFIX/var/kwiki/database/KwikiSandbox
          echo "++ Generating administrator view of Kwiki in $RPM_INSTALL_PREFIX/var/kwiki/admin/"
          $RPM_INSTALL_PREFIX/bin/kwiki -quiet -new_view admin
          ( echo "+Kwiki::PagePrivacy"
          ) >>admin/plugins
          ( echo "privacy_group: admin"
          ) >admin/config2.yaml
          $RPM_INSTALL_PREFIX/bin/htpasswd -b -c admin/passwd admin admin
          echo "++ Finalizing Kwiki in $RPM_INSTALL_PREFIX/var/kwiki/"
          $RPM_INSTALL_PREFIX/bin/kwiki-update
        ) || 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/bin/openpkg rc apache start"
          echo "Further Kwiki configuration can be done in the files:"
          echo "  $RPM_INSTALL_PREFIX/var/kwiki/plugins"
          echo "  $RPM_INSTALL_PREFIX/var/kwiki/config.yaml"
          echo "To activate your changes run:"
          echo "  \$ $RPM_INSTALL_PREFIX/bin/kwiki-update"
          echo "  \$ $RPM_INSTALL_PREFIX/bin/openpkg rc apache stop start"
          echo "The Kwiki Homepage URLs are:"
          echo "  http://localhost/kwiki/       (user view)"
          echo "  http://localhost/kwiki/admin/ (administrator view)"
          echo "Use the username \"admin\" with password \"admin\" to"
          echo "login to the administrator view."
        ) | %{l_rpmtool} msg -b -t notice
    fi

%preun
    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

        #   remove Kwiki files
        rm -rf $RPM_INSTALL_PREFIX/var/kwiki/.[a-z]* 2>/dev/null || true
        rm -rf $RPM_INSTALL_PREFIX/var/kwiki/*       2>/dev/null || true
    fi

