]> git.pld-linux.org Git - packages/dokuwiki-plugin-database.git/blob - dokuwiki-plugin-database.spec
- add datadir.patch, simplify
[packages/dokuwiki-plugin-database.git] / dokuwiki-plugin-database.spec
1 %define         plugin          database
2 Summary:        Design your own database and manage the data within the wiki
3 Summary(pl.UTF-8):      Wtyczka database dla DokuWiki
4 Name:           dokuwiki-plugin-%{plugin}
5 Version:        1.0.4
6 Release:        0.3
7 License:        GPL v2
8 Group:          Applications/WWW
9 Source0:        http://www.langhamassociates.com/media/database.tgz
10 # Source0-md5:  14ae5bb2f6c40a525220a815611892ee
11 Patch0:         datadir.patch
12 URL:            http://wiki.splitbrain.org/plugin:database
13 BuildRequires:  rpmbuild(macros) >= 1.520
14 BuildRequires:  sed >= 4.0
15 Requires:       dokuwiki >= 20090214b-2
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 %define         find_lang       %{_usrlibrpm}/dokuwiki-find-lang.sh %{buildroot}
23
24 %description
25 The database Plugin lets you create tables and columns and to populate
26 them with content.
27
28 The content can then be sorted and filtered by any of the columns.
29
30 There are a number of built-in lookups such as Gender, i.e. Male and
31 Female, Title, i.e. Mr., Ms, etc.
32
33 You can also use the contents of one table as a reference table, for
34 example a table of countries can be used so that the name of the
35 country is only held once in one table and other tables refer to it...
36
37 %prep
38 %setup -q -cn %{plugin}
39 mv lib/plugins/%{plugin}/* .
40 %{__sed} -i -e 's,\r$,,' *.php
41 %patch0 -p1
42
43 version=$(awk -Fv '$0 == " * v%{version}"{print $2}' action.php)
44 if [ "$version" != %{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 rm -f $RPM_BUILD_ROOT%{plugindir}/{CREDITS,changelog}
54 rm -f $RPM_BUILD_ROOT%{plugindir}/{COPYING,README,VERSION}
55
56 # find locales
57 %find_lang %{name}.lang
58
59 %clean
60 rm -rf $RPM_BUILD_ROOT
61
62 %post
63 # force css cache refresh
64 if [ -f %{dokuconf}/local.php ]; then
65         touch %{dokuconf}/local.php
66 fi
67
68 %files -f %{name}.lang
69 %defattr(644,root,root,755)
70 %dir %{plugindir}
71 %{plugindir}/*.php
72 %{plugindir}/images
This page took 0.06482 seconds and 3 git commands to generate.