2 Summary: DokuWiki Structured Data Plugin
3 Name: dokuwiki-plugin-%{plugin}
7 Group: Applications/WWW
8 Source0: http://dev.splitbrain.org/download/snapshots/data-plugin-latest.tgz
9 # Source0-md5: f55adb2c5643693fca8b7ef73944f6e4
10 URL: http://wiki.splitbrain.org/plugin:data
11 Patch0: interwiki.patch
12 Patch1: helper-map.patch
13 BuildRequires: rpmbuild(macros) >= 1.520
14 Requires: dokuwiki >= 20090214b-5
17 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
19 %define dokuconf /etc/webapps/dokuwiki
20 %define dokudir /usr/share/dokuwiki
21 %define cachedir /var/lib/dokuwiki/cache
22 %define plugindir %{dokudir}/lib/plugins/%{plugin}
23 %define find_lang %{_usrlibrpm}/dokuwiki-find-lang.sh %{buildroot}
26 This plugin allows you to add structured data to any DokuWiki page.
27 Think about this data as additional named attributes. Those attributes
28 can then be queried and aggregated. The plugin is similar to what was
29 done here for the repository plugin but its internals are very
30 different to the repository plugin.
33 %setup -q -n %{plugin}
37 # cleanup backups after patching
38 find '(' -name '*~' -o -name '*.orig' ')' -print0 | xargs -0 -r -l512 rm -f
40 version=$(awk -F"'" '/date/{print $4}' helper.php)
41 if [ $(echo "$version" | tr -d -) != %{version} ]; then
42 : %%{version} mismatch
47 rm -rf $RPM_BUILD_ROOT
48 install -d $RPM_BUILD_ROOT{%{plugindir},%{cachedir}}
49 cp -a . $RPM_BUILD_ROOT%{plugindir}
51 touch $RPM_BUILD_ROOT%{cachedir}/dataplugin.sqlite
54 %find_lang %{name}.lang
57 rm -rf $RPM_BUILD_ROOT
60 # force css cache refresh
61 if [ -f %{dokuconf}/local.php ]; then
62 touch %{dokuconf}/local.php
65 %files -f %{name}.lang
66 %defattr(644,root,root,755)
72 %attr(660,http,http) %ghost %{cachedir}/dataplugin.sqlite