]>
Commit | Line | Data |
---|---|---|
b32ce883 ER |
1 | # TODO |
2 | # - use more system pkgs | |
3 | %define plugin html2pdf | |
4 | Summary: DokuWiki plugin to export HTML to PDF | |
5 | Summary(pl.UTF-8): Wtyczka html2pdf dla DokuWiki | |
6 | Name: dokuwiki-plugin-%{plugin} | |
7 | Version: 20090215 | |
8 | Release: 0.1 | |
9 | License: GPL v2 | |
10 | Group: Applications/WWW | |
11 | Source0: http://snorriheim.dnsdojo.com/dokuPlugins/html2pdf.tar.gz | |
12 | # Source0-md5: 89e8a250bbb14f0ce9d649c286a415b4 | |
13 | URL: http://wiki.splitbrain.org/plugin:html2pdf | |
14 | BuildRequires: rpmbuild(macros) >= 1.520 | |
15 | Requires: dokuwiki | |
16 | BuildArch: noarch | |
17 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
18 | ||
19 | %define dokuconf /etc/webapps/dokuwiki | |
20 | %define dokudir /usr/share/dokuwiki | |
21 | %define plugindir %{dokudir}/lib/plugins/%{plugin} | |
22 | ||
23 | %description | |
24 | DokuWiki plugin to export HTML to PDF. | |
25 | ||
26 | %description -l pl.UTF-8 | |
27 | Wtyczka dla DokuWiki | |
28 | ||
29 | %prep | |
30 | %setup -q -n %{plugin} | |
31 | %{__sed} -i -e 's,\r$,,' info.txt | |
32 | version=$(awk '/date/{print $2}' info.txt) | |
33 | if [ $(echo "$version" | tr -d -) != %{version} ]; then | |
34 | : %%{version} mismatch | |
35 | exit 1 | |
36 | fi | |
37 | ||
38 | %install | |
39 | rm -rf $RPM_BUILD_ROOT | |
40 | install -d $RPM_BUILD_ROOT%{plugindir} | |
41 | cp -a action.php conf $RPM_BUILD_ROOT%{plugindir} | |
42 | cp -a html2ps $RPM_BUILD_ROOT%{plugindir} | |
43 | ||
44 | %clean | |
45 | rm -rf $RPM_BUILD_ROOT | |
46 | ||
47 | %post | |
48 | # force css cache refresh | |
49 | if [ -f %{dokuconf}/local.php ]; then | |
50 | touch %{dokuconf}/local.php | |
51 | fi | |
52 | ||
53 | %files | |
54 | %defattr(644,root,root,755) | |
55 | %dir %{plugindir} | |
56 | %{plugindir}/*.php | |
57 | %{plugindir}/conf | |
58 | %{plugindir}/html2ps |