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