remove libexecdir patch
[ikiwiki] / ikiwiki.spec
1 Name:           ikiwiki
2 Version: 3.20091024
3 Release:        1%{?dist}
4 Summary:        A wiki compiler
5
6 Group:          Applications/Internet
7 License:        GPLv2+
8 URL:            http://ikiwiki.info/
9 BuildArch:      noarch
10
11 BuildRequires:  perl(Text::Markdown)
12 BuildRequires:  perl(Mail::Sendmail)
13 BuildRequires:  perl(HTML::Scrubber)
14 BuildRequires:  perl(XML::Simple)
15 BuildRequires:  perl(Date::Parse)
16 BuildRequires:  perl(Date::Format)
17 BuildRequires:  perl(HTML::Template)
18 BuildRequires:  perl(CGI::FormBuilder)
19 BuildRequires:  perl(CGI::Session)
20 BuildRequires:  perl(File::MimeInfo)
21 BuildRequires:  gettext
22 BuildRequires:  po4a
23
24 Requires:       perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
25
26 Requires:       perl(Text::Markdown)
27 Requires:       perl(Mail::Sendmail)
28 Requires:       perl(HTML::Scrubber)
29 Requires:       perl(XML::Simple)
30 Requires:       perl(CGI::FormBuilder)
31 Requires:       perl(CGI::Session)
32 Requires:       perl(Digest::SHA1)
33
34 Requires:       python-docutils
35
36 %define cgi_bin %{_libexecdir}/w3m/cgi-bin
37
38
39 %description
40 Ikiwiki is a wiki compiler. It converts wiki pages into HTML pages
41 suitable for publishing on a website. Ikiwiki stores pages and history
42 in a revision control system such as Subversion or Git. There are many
43 other features, including support for blogging, as well as a large
44 array of plugins.
45
46
47 %prep
48 %setup0 -q -n %{name}
49
50 # Filter unwanted Provides:
51 %{__cat} << \EOF > %{name}-prov
52 #!/bin/sh
53 %{__perl_provides} $* |\
54   %{__sed} -e '/perl(IkiWiki.*)/d'
55 EOF
56
57 %define __perl_provides %{_builddir}/%{name}/%{name}-prov
58 %{__chmod} +x %{__perl_provides}
59
60 # Filter Requires, all used by plugins
61 # - Monotone: see bz 450267
62 %{__cat} << \EOF > %{name}-req
63 #!/bin/sh
64 %{__perl_requires} $* |\
65   %{__sed} -e '/perl(IkiWiki.*)/d' \
66            -e '/perl(Monotone)/d'
67 EOF
68
69 %define __perl_requires %{_builddir}/%{name}/%{name}-req
70 %{__chmod} +x %{__perl_requires}
71
72 # goes into the -w3m subpackage
73 %{__cat} << \EOF > README.fedora
74 See http://ikiwiki.info/w3mmode/ for more information.
75 EOF
76
77
78 %build
79 %{__perl} Makefile.PL INSTALLDIRS=vendor PREFIX=%{_prefix}
80 # parallel builds currently don't work
81 %{__make} 
82
83
84 %install
85 %{__rm} -rf %{buildroot}
86 %{__make} pure_install DESTDIR=%{buildroot} W3M_CGI_BIN=%{cgi_bin}
87 %find_lang %{name}
88
89 %clean
90 %{__rm} -rf %{buildroot}
91
92
93 %files -f %{name}.lang
94 %defattr(-,root,root,-)
95 %{_bindir}/ikiwiki*
96 %{_sbindir}/ikiwiki*
97 %{_mandir}/man1/ikiwiki*
98 %{_mandir}/man8/ikiwiki*
99 %{_datadir}/ikiwiki
100 %dir %{_sysconfdir}/ikiwiki
101 %config(noreplace) %{_sysconfdir}/ikiwiki/*
102 # contains a packlist only
103 %exclude %{perl_vendorarch}
104 %{perl_vendorlib}/IkiWiki*
105 %exclude %{perl_vendorlib}/IkiWiki*/Plugin/skeleton.pm.example
106 %{_libdir}/ikiwiki
107 %doc README debian/changelog debian/NEWS html
108 %doc IkiWiki/Plugin/skeleton.pm.example
109
110
111 %package w3m
112 Summary:        Ikiwiki w3m cgi meta-wrapper
113 Group:          Applications/Internet
114 Requires:       w3m
115 Requires:       %{name} = %{version}-%{release}
116
117 %description w3m
118 Enable usage of all of ikiwiki's web features (page editing, etc) in
119 the w3m web browser without a web server. w3m supports local CGI
120 scripts, and ikiwiki can be set up to run that way using the
121 meta-wrapper in this package.
122
123
124 %files w3m
125 %defattr(-,root,root,-)
126 %doc README.fedora
127 %{cgi_bin}/ikiwiki-w3m.cgi