]>
Commit | Line | Data |
---|---|---|
e6346a71 ER |
1 | # TODO |
2 | # - system mpdf | |
3 | %define plugin dw2pdf | |
4 | %define php_min_version 5.0.0 | |
5 | %include /usr/lib/rpm/macros.php | |
6 | Summary: Export DokuWiki content to PDF | |
7 | Name: dokuwiki-plugin-%{plugin} | |
8 | Version: 20120123 | |
9 | Release: 0.1 | |
10 | License: GPL v2 | |
11 | Group: Applications/WWW | |
12 | Source0: http://github.com/splitbrain/dokuwiki-plugin-%{plugin}/tarball/master#/%{plugin}-%{version}.tgz | |
13 | # Source0-md5: 9a95f566ba0553e488f27ea58552b0f3 | |
14 | URL: http://www.dokuwiki.org/plugin:dw2pdf | |
15 | BuildRequires: rpm-php-pearprov >= 4.4.2-11 | |
16 | BuildRequires: rpmbuild(macros) >= 1.520 | |
17 | Requires: dokuwiki >= 20101107 | |
18 | Requires: php-common >= 4:%{php_min_version} | |
759a0ca5 | 19 | Conflicts: dokuwiki-plugin-html2pdf |
e6346a71 ER |
20 | BuildArch: noarch |
21 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
22 | ||
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} | |
27 | ||
28 | # no pear deps | |
29 | %define _noautopear pear | |
30 | ||
31 | # put it together for rpmbuild | |
32 | %define _noautoreq %{?_noautophp} %{?_noautopear} | |
33 | ||
34 | %description | |
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 | |
38 | the latex plugin). | |
39 | ||
40 | %prep | |
41 | %setup -qc | |
42 | mv *-%{plugin}-*/* . | |
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 | ||
50 | %install | |
51 | rm -rf $RPM_BUILD_ROOT | |
52 | install -d $RPM_BUILD_ROOT%{plugindir} | |
53 | cp -a . $RPM_BUILD_ROOT%{plugindir} | |
54 | ||
55 | %find_lang %{name}.lang | |
56 | ||
57 | %clean | |
58 | rm -rf $RPM_BUILD_ROOT | |
59 | ||
60 | %post | |
61 | # force js/css cache refresh | |
62 | if [ -f %{dokuconf}/local.php ]; then | |
63 | touch %{dokuconf}/local.php | |
64 | fi | |
65 | ||
66 | %files -f %{name}.lang | |
67 | %defattr(644,root,root,755) | |
68 | %dir %{plugindir} | |
69 | %{plugindir}/*.php | |
70 | %{plugindir}/*.txt | |
71 | %{plugindir}/conf | |
72 | %{plugindir}/mpdf | |
73 | %{plugindir}/tpl |