86a74ae
Name:           ikiwiki
86a74ae
Version:        2.51
86a74ae
Release:        1%{?dist}
86a74ae
Summary:        A wiki compiler
86a74ae
86a74ae
Group:          Applications/Internet
86a74ae
License:        GPLv2+
86a74ae
URL:            http://ikiwiki.info/
86a74ae
Source0:        http://ftp.debian.org/debian/pool/main/i/%{name}/%{name}_%{version}.tar.gz
86a74ae
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
86a74ae
BuildArch:      noarch
86a74ae
86a74ae
BuildRequires:  perl(Text::Markdown)
86a74ae
BuildRequires:  perl(Mail::Sendmail)
86a74ae
BuildRequires:  perl(HTML::Scrubber)
86a74ae
BuildRequires:  perl(XML::Simple)
86a74ae
BuildRequires:  perl(Date::Parse)
86a74ae
BuildRequires:  perl(Date::Format)
86a74ae
BuildRequires:  perl(HTML::Template)
86a74ae
BuildRequires:  perl(CGI::FormBuilder)
86a74ae
BuildRequires:  perl(CGI::Session)
86a74ae
BuildRequires:  perl(File::MimeInfo)
86a74ae
BuildRequires:  gettext
86a74ae
86a74ae
Requires:       perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
86a74ae
86a74ae
Requires:       perl(Text::Markdown)
86a74ae
Requires:       perl(Mail::Sendmail)
86a74ae
Requires:       perl(HTML::Scrubber)
86a74ae
Requires:       perl(XML::Simple)
86a74ae
Requires:       perl(CGI::FormBuilder)
86a74ae
Requires:       perl(CGI::Session)
86a74ae
Requires:       perl(Digest::SHA1)
86a74ae
86a74ae
%define cgi_bin %{_libexecdir}/w3m/cgi-bin
86a74ae
86a74ae
86a74ae
%description
86a74ae
Ikiwiki is a wiki compiler. It converts wiki pages into HTML pages
86a74ae
suitable for publishing on a website. Ikiwiki stores pages and history
86a74ae
in a revision control system such as Subversion or Git. There are many
86a74ae
other features, including support for blogging, as well as a large
86a74ae
array of plugins.
86a74ae
86a74ae
86a74ae
%prep
86a74ae
%setup -q -n %{name}
86a74ae
86a74ae
# Filter unwanted Provides:
86a74ae
%{__cat} << \EOF > %{name}-prov
86a74ae
#!/bin/sh
86a74ae
%{__perl_provides} $* |\
86a74ae
  %{__sed} -e '/perl(IkiWiki.*)/d'
86a74ae
EOF
86a74ae
86a74ae
%define __perl_provides %{_builddir}/%{name}/%{name}-prov
86a74ae
%{__chmod} +x %{__perl_provides}
86a74ae
86a74ae
# Filter Requires, all used by plugins
86a74ae
# - Monotone: see bz 450267
86a74ae
# - RPC::XML: see bz 435835
86a74ae
# - Net::Amazon:::S3: see bz 436481
86a74ae
%{__cat} << \EOF > %{name}-req
86a74ae
#!/bin/sh
86a74ae
%{__perl_requires} $* |\
86a74ae
  %{__sed} -e '/perl(IkiWiki.*)/d' \
86a74ae
           -e '/perl(Monotone)/d' \
86a74ae
           -e '/perl(RPC::XML)/d' \
86a74ae
           -e '/perl(RPC::XML::Parser)/d' \
86a74ae
           -e '/perl(Net::Amazon::S3)/d'
86a74ae
EOF
86a74ae
86a74ae
%define __perl_requires %{_builddir}/%{name}/%{name}-req
86a74ae
%{__chmod} +x %{__perl_requires}
86a74ae
86a74ae
# goes into the -w3m subpackage
86a74ae
%{__cat} << \EOF > README.fedora
86a74ae
See http://ikiwiki.info/w3mmode/ for more information.
86a74ae
EOF
86a74ae
86a74ae
86a74ae
%build
86a74ae
%{__perl} Makefile.PL INSTALLDIRS=vendor PREFIX=%{_prefix}
86a74ae
# parallel builds currently don't work
86a74ae
%{__make} 
86a74ae
86a74ae
86a74ae
%install
86a74ae
%{__rm} -rf %{buildroot}
86a74ae
%{__make} pure_install DESTDIR=%{buildroot}
86a74ae
%find_lang %{name}
86a74ae
86a74ae
# cgi script is wrongly installed in a fixed place
86a74ae
%{__mkdir_p} %{buildroot}%{cgi_bin}
86a74ae
%{__mv} %{buildroot}/usr/lib/w3m/cgi-bin/ikiwiki-w3m.cgi \
86a74ae
        %{buildroot}%{cgi_bin}
86a74ae
86a74ae
# fix encoding
86a74ae
iconv -f iso-8859-9 -t utf-8 \
86a74ae
      html/tips/vim_syntax_highlighting/ikiwiki.vim \
86a74ae
      -o html/tips/vim_syntax_highlighting/ikiwiki.vim.tmp
86a74ae
%{__mv} html/tips/vim_syntax_highlighting/ikiwiki.vim.tmp \
86a74ae
        html/tips/vim_syntax_highlighting/ikiwiki.vim
86a74ae
86a74ae
86a74ae
%clean
86a74ae
%{__rm} -rf %{buildroot}
86a74ae
86a74ae
86a74ae
%files -f %{name}.lang
86a74ae
%defattr(-,root,root,-)
86a74ae
%{_bindir}/ikiwiki*
86a74ae
%{_sbindir}/ikiwiki*
86a74ae
%{_mandir}/man1/ikiwiki*
86a74ae
%{_mandir}/man8/ikiwiki*
86a74ae
%{_datadir}/ikiwiki
86a74ae
# contains a packlist only
86a74ae
%exclude %{perl_vendorarch}
86a74ae
%{perl_vendorlib}/IkiWiki*
86a74ae
# directory for external (non-perl) plugins, needs RPC::XML
86a74ae
%exclude %{_prefix}/lib/ikiwiki/plugins/*
86a74ae
%doc README debian/changelog debian/NEWS
86a74ae
%doc html
86a74ae
86a74ae
%package w3m
86a74ae
Summary:        Ikiwiki w3m cgi meta-wrapper
86a74ae
Group:          Applications/Internet
86a74ae
Requires:       w3m
86a74ae
Requires:       %{name} = %{version}-%{release}
86a74ae
86a74ae
%description w3m
86a74ae
Enable usage of all of ikiwiki's web features (page editing, etc) in
86a74ae
the w3m web browser without a web server. w3m supports local CGI
86a74ae
scripts, and ikiwiki can be set up to run that way using the
86a74ae
meta-wrapper in this package.
86a74ae
86a74ae
86a74ae
%files w3m
86a74ae
%defattr(-,root,root,-)
86a74ae
%doc README.fedora
86a74ae
%{cgi_bin}/ikiwiki-w3m.cgi
86a74ae
86a74ae
86a74ae
%changelog
86a74ae
* Sun Jul  6 2008 Thomas Moschny <thomas.moschny@gmx.de> - 2.51-1
86a74ae
- Update to 2.51.
86a74ae
- Save iconv output to a temporary file.
86a74ae
86a74ae
* Sun Jun 15 2008 Thomas Moschny <thomas.moschny@gmx.de> - 2.50-1
86a74ae
- Update to 2.50.
86a74ae
- Move ikiwiki-w3m.cgi into a subpackage.
86a74ae
- Add ikiwiki's own documentation.
86a74ae
- Remove duplicate requirement perl(File::MimeInfo).
86a74ae
- Minor cleanups.
86a74ae
86a74ae
* Mon Jun  2 2008 Thomas Moschny <thomas.moschny@gmx.de> - 2.48-1
86a74ae
- Update to 2.48.
86a74ae
86a74ae
* Wed May 28 2008 Thomas Moschny <thomas.moschny@gmx.de> - 2.47-1
86a74ae
- Update to 2.47.
86a74ae
86a74ae
* Tue May 13 2008 Thomas Moschny <thomas.moschny@gmx.de> - 2.46-1
86a74ae
- Update to 2.46.
86a74ae
86a74ae
* Sat May 10 2008 Thomas Moschny <thomas.moschny@gmx.de> - 2.45-1
86a74ae
- New package.