]>
Commit | Line | Data |
---|---|---|
c8873b7e ER |
1 | %define plugin datatemplate |
2 | %define php_min_version 5.1.0 | |
3 | %include /usr/lib/rpm/macros.php | |
4 | Summary: DokuWiki plugin to add template capabilities to the data plugin | |
5 | Name: dokuwiki-plugin-%{plugin} | |
6 | Version: 20110203 | |
712f668a | 7 | Release: 2 |
c8873b7e ER |
8 | License: GPL v2 |
9 | Group: Applications/WWW | |
10 | Source0: https://github.com/ccl/dokuwiki-plugin-datatemplate/tarball/master#/%{plugin}.tgz | |
11 | # Source0-md5: 24fa802fa2cc5a3b6337fe24f1b75a18 | |
12 | URL: http://www.dokuwiki.org/plugin:datatemplate | |
13 | BuildRequires: rpm-php-pearprov >= 4.4.2-11 | |
14 | BuildRequires: rpmbuild(macros) >= 1.520 | |
15 | Requires: dokuwiki >= 20090214 | |
16 | Requires: dokuwiki-plugin-data | |
17 | Requires: php-common >= 4:%{php_min_version} | |
18 | Requires: php-pcre | |
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 | ||
26 | # this is data plugin dependency | |
27 | %define _noautophp php-sqlite | |
28 | ||
29 | # put it together for rpmbuild | |
30 | %define _noautoreq %{?_noautophp} %{?_noautopear} | |
31 | ||
32 | %description | |
33 | This plugin adds the possibility to display the structered data of the | |
34 | data plugin using templates. Templates can be applied to individual | |
35 | data entries or lists of multiple entries. Additionally, this plugin | |
36 | offers a custom search form, pagination and result caching. | |
37 | ||
38 | %prep | |
39 | %setup -qc | |
c8873b7e ER |
40 | mv *-%{plugin}-*/* . |
41 | rm *-%{plugin}-*/.gitignore | |
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 | %clean | |
55 | rm -rf $RPM_BUILD_ROOT | |
56 | ||
57 | # use this post section if you package .css or .js files | |
58 | %post | |
59 | # force js/css cache refresh | |
60 | if [ -f %{dokuconf}/local.php ]; then | |
61 | touch %{dokuconf}/local.php | |
62 | fi | |
63 | ||
64 | %files | |
65 | %defattr(644,root,root,755) | |
66 | %dir %{plugindir} | |
67 | %{plugindir}/*.css | |
68 | %{plugindir}/*.txt | |
69 | %{plugindir}/syntax |