]> git.pld-linux.org Git - packages/dokuwiki-plugin-dw2pdf.git/blob - dokuwiki-plugin-dw2pdf.spec
ab682b0808ee263a87e6f9949ecb3eb062e2958c
[packages/dokuwiki-plugin-dw2pdf.git] / dokuwiki-plugin-dw2pdf.spec
1 %define         plugin          dw2pdf
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}
6 Version:        20120123
7 Release:        1
8 License:        GPL v2
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-common >= 4:%{php_min_version}
18 Requires:       php-mpdf >= 5.3
19 Conflicts:      dokuwiki-plugin-html2pdf
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 %patch0 -p1
44
45 version=$(awk '/^date/{print $2}' plugin.info.txt)
46 if [ "$(echo "$version" | tr -d -)" != %{version} ]; then
47         : %%{version} mismatch
48 #       exit 1
49 fi
50
51 rm -rf mpdf
52
53 %install
54 rm -rf $RPM_BUILD_ROOT
55 install -d $RPM_BUILD_ROOT%{plugindir}
56 cp -a . $RPM_BUILD_ROOT%{plugindir}
57
58 %find_lang %{name}.lang
59
60 %clean
61 rm -rf $RPM_BUILD_ROOT
62
63 %post
64 # force js/css cache refresh
65 if [ -f %{dokuconf}/local.php ]; then
66         touch %{dokuconf}/local.php
67 fi
68
69 %files -f %{name}.lang
70 %defattr(644,root,root,755)
71 %dir %{plugindir}
72 %{plugindir}/*.php
73 %{plugindir}/*.txt
74 %{plugindir}/conf
75 %{plugindir}/tpl
This page took 0.021753 seconds and 2 git commands to generate.