]> git.pld-linux.org Git - packages/dokuwiki-plugin-dw2pdf.git/blob - dokuwiki-plugin-dw2pdf.spec
- drop obsolete and outdated manual inclusion of rpm macros
[packages/dokuwiki-plugin-dw2pdf.git] / dokuwiki-plugin-dw2pdf.spec
1 %define         plugin          dw2pdf
2 %define         php_min_version 5.1.0
3 Summary:        Export DokuWiki content to PDF
4 Name:           dokuwiki-plugin-%{plugin}
5 Version:        20120123
6 Release:        2
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
11 Patch0:         system-mpdf.patch
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
16 Requires:       php(core) >= %{php_min_version}
17 Requires:       php-mpdf >= 5.3
18 Conflicts:      dokuwiki-plugin-html2pdf
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}-*/* .
42 %patch0 -p1
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 rm -rf mpdf
51
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
74 %{plugindir}/tpl
This page took 0.058062 seconds and 3 git commands to generate.