]>
Commit | Line | Data |
---|---|---|
e6346a71 | 1 | %define plugin dw2pdf |
f4b12eee | 2 | %define php_min_version 5.1.0 |
e6346a71 ER |
3 | Summary: Export DokuWiki content to PDF |
4 | Name: dokuwiki-plugin-%{plugin} | |
5 | Version: 20120123 | |
173651d8 | 6 | Release: 2 |
e6346a71 ER |
7 | License: GPL v2 |
8 | Group: Applications/WWW | |
9 | Source0: http://github.com/splitbrain/dokuwiki-plugin-%{plugin}/tarball/master#/%{plugin}-%{version}.tgz | |
10 | # Source0-md5: 9a95f566ba0553e488f27ea58552b0f3 | |
f4b12eee | 11 | Patch0: system-mpdf.patch |
e6346a71 ER |
12 | URL: http://www.dokuwiki.org/plugin:dw2pdf |
13 | BuildRequires: rpm-php-pearprov >= 4.4.2-11 | |
14 | BuildRequires: rpmbuild(macros) >= 1.520 | |
15 | Requires: dokuwiki >= 20101107 | |
173651d8 | 16 | Requires: php(core) >= %{php_min_version} |
f4b12eee | 17 | Requires: php-mpdf >= 5.3 |
759a0ca5 | 18 | Conflicts: dokuwiki-plugin-html2pdf |
e6346a71 ER |
19 | BuildArch: noarch |
20 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
21 | ||
22 | %define dokuconf /etc/webapps/dokuwiki | |
23 | %define dokudir /usr/share/dokuwiki | |
24 | %define plugindir %{dokudir}/lib/plugins/%{plugin} | |
25 | %define find_lang %{_usrlibrpm}/dokuwiki-find-lang.sh %{buildroot} | |
26 | ||
27 | # no pear deps | |
28 | %define _noautopear pear | |
29 | ||
30 | # put it together for rpmbuild | |
31 | %define _noautoreq %{?_noautophp} %{?_noautopear} | |
32 | ||
33 | %description | |
34 | The goal of this plugin was to provide a simple, ready to go PDF | |
35 | converter that almost faithfully replicates the screen view of your | |
36 | wiki pages (i.e. doesn't convert them to a print-document format like | |
37 | the latex plugin). | |
38 | ||
39 | %prep | |
40 | %setup -qc | |
41 | mv *-%{plugin}-*/* . | |
f4b12eee | 42 | %patch0 -p1 |
e6346a71 ER |
43 | |
44 | version=$(awk '/^date/{print $2}' plugin.info.txt) | |
45 | if [ "$(echo "$version" | tr -d -)" != %{version} ]; then | |
46 | : %%{version} mismatch | |
47 | # exit 1 | |
48 | fi | |
49 | ||
f4b12eee ER |
50 | rm -rf mpdf |
51 | ||
e6346a71 ER |
52 | %install |
53 | rm -rf $RPM_BUILD_ROOT | |
54 | install -d $RPM_BUILD_ROOT%{plugindir} | |
55 | cp -a . $RPM_BUILD_ROOT%{plugindir} | |
56 | ||
57 | %find_lang %{name}.lang | |
58 | ||
59 | %clean | |
60 | rm -rf $RPM_BUILD_ROOT | |
61 | ||
62 | %post | |
63 | # force js/css cache refresh | |
64 | if [ -f %{dokuconf}/local.php ]; then | |
65 | touch %{dokuconf}/local.php | |
66 | fi | |
67 | ||
68 | %files -f %{name}.lang | |
69 | %defattr(644,root,root,755) | |
70 | %dir %{plugindir} | |
71 | %{plugindir}/*.php | |
72 | %{plugindir}/*.txt | |
73 | %{plugindir}/conf | |
e6346a71 | 74 | %{plugindir}/tpl |