2 %define php_min_version 5.1.0
3 %include /usr/lib/rpm/macros.php
4 Summary: Export DokuWiki content to PDF
5 Name: dokuwiki-plugin-%{plugin}
9 Group: Applications/WWW
10 Source0: http://github.com/splitbrain/dokuwiki-plugin-%{plugin}/tarball/master#/%{plugin}-%{version}.tgz
11 # Source0-md5: 9a95f566ba0553e488f27ea58552b0f3
12 Patch0: system-mpdf.patch
13 URL: http://www.dokuwiki.org/plugin:dw2pdf
14 BuildRequires: rpm-php-pearprov >= 4.4.2-11
15 BuildRequires: rpmbuild(macros) >= 1.520
16 Requires: dokuwiki >= 20101107
17 Requires: php(core) >= %{php_min_version}
18 Requires: php-mpdf >= 5.3
19 Conflicts: dokuwiki-plugin-html2pdf
21 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
23 %define dokuconf /etc/webapps/dokuwiki
24 %define dokudir /usr/share/dokuwiki
25 %define plugindir %{dokudir}/lib/plugins/%{plugin}
26 %define find_lang %{_usrlibrpm}/dokuwiki-find-lang.sh %{buildroot}
29 %define _noautopear pear
31 # put it together for rpmbuild
32 %define _noautoreq %{?_noautophp} %{?_noautopear}
35 The goal of this plugin was to provide a simple, ready to go PDF
36 converter that almost faithfully replicates the screen view of your
37 wiki pages (i.e. doesn't convert them to a print-document format like
45 version=$(awk '/^date/{print $2}' plugin.info.txt)
46 if [ "$(echo "$version" | tr -d -)" != %{version} ]; then
47 : %%{version} mismatch
54 rm -rf $RPM_BUILD_ROOT
55 install -d $RPM_BUILD_ROOT%{plugindir}
56 cp -a . $RPM_BUILD_ROOT%{plugindir}
58 %find_lang %{name}.lang
61 rm -rf $RPM_BUILD_ROOT
64 # force js/css cache refresh
65 if [ -f %{dokuconf}/local.php ]; then
66 touch %{dokuconf}/local.php
69 %files -f %{name}.lang
70 %defattr(644,root,root,755)