]> git.pld-linux.org Git - packages/dokuwiki-plugin-data.git/blob - dokuwiki-plugin-data.spec
- up to 20100125 snap
[packages/dokuwiki-plugin-data.git] / dokuwiki-plugin-data.spec
1 %define         plugin          data
2 Summary:        DokuWiki Structured Data Plugin
3 Name:           dokuwiki-plugin-%{plugin}
4 Version:        20100125
5 Release:        1
6 License:        GPL v2
7 Group:          Applications/WWW
8 Source0:        http://download.github.com/splitbrain-dokuwiki-plugin-data-1e1e56a.zip
9 # Source0-md5:  2f1fbc2c8c88e846d5fd52c8500c0294
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
15 Requires:       php(sqlite)
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         cachedir        /var/lib/dokuwiki/cache
22 %define         plugindir       %{dokudir}/lib/plugins/%{plugin}
23 %define         find_lang       %{_usrlibrpm}/dokuwiki-find-lang.sh %{buildroot}
24
25 %description
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.
31
32 %prep
33 %setup -qc -n %{plugin}
34 mv splitbrain-dokuwiki-plugin-data-*/* .
35 %patch0 -p1
36 %patch1 -p1
37
38 version=$(awk '/date/{print $2}' plugin.info.txt)
39 if [ $(echo "$version" | tr -d -) != %{version} ]; then
40         : %%{version} mismatch
41         exit 1
42 fi
43
44 # cleanup backups after patching
45 find '(' -name '*~' -o -name '*.orig' ')' -print0 | xargs -0 -r -l512 rm -f
46
47 %install
48 rm -rf $RPM_BUILD_ROOT
49 install -d $RPM_BUILD_ROOT{%{plugindir},%{cachedir}}
50 cp -a . $RPM_BUILD_ROOT%{plugindir}
51
52 touch $RPM_BUILD_ROOT%{cachedir}/dataplugin.sqlite
53
54 # find locales
55 %find_lang %{name}.lang
56
57 %clean
58 rm -rf $RPM_BUILD_ROOT
59
60 %post
61 # force css cache refresh
62 if [ -f %{dokuconf}/local.php ]; then
63         touch %{dokuconf}/local.php
64 fi
65
66 %files -f %{name}.lang
67 %defattr(644,root,root,755)
68 %dir %{plugindir}
69 %{plugindir}/syntax
70 %{plugindir}/*.php
71 %{plugindir}/*.txt
72 %{plugindir}/*.css
73 %{plugindir}/*.sql
74 %attr(660,http,http) %ghost %{cachedir}/dataplugin.sqlite
This page took 0.208501 seconds and 4 git commands to generate.