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