]>
Commit | Line | Data |
---|---|---|
f72f606b ER |
1 | %include /usr/lib/rpm/macros.php |
2 | %define php_min_version 5.0.0 | |
3 | %define plugin sqlite | |
4 | Summary: DokuWiki helper plugin to easily access a SQLite database | |
5 | Name: dokuwiki-plugin-%{plugin} | |
6 | Version: 20100203 | |
7 | Release: 1 | |
8 | License: GPL v2 | |
9 | Group: Applications/WWW | |
10 | Source0: http://download.github.com/cosmocode-sqlite-fb39468.zip | |
11 | # Source0-md5: cb14741dd492ae41022b5baa436c78e5 | |
12 | URL: http://wiki.splitbrain.org/plugin:sqlite | |
13 | BuildRequires: rpmbuild(macros) >= 1.461 | |
14 | BuildRequires: rpmbuild(macros) >= 1.520 | |
15 | Requires: dokuwiki >= 20091225 | |
16 | Requires: php-common >= 4:%{php_min_version} | |
17 | Requires: php-date | |
18 | Requires: php-pcre | |
19 | Requires: php-sqlite | |
20 | BuildArch: noarch | |
21 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
22 | ||
23 | %define dokuconf /etc/webapps/dokuwiki | |
24 | %define dokudir /usr/share/dokuwiki | |
25 | %define plugindir %{dokudir}/lib/plugins/%{plugin} | |
26 | %define find_lang %{_usrlibrpm}/dokuwiki-find-lang.sh %{buildroot} | |
27 | ||
28 | %description | |
29 | DokuWiki helper plugin to easily access a SQLite database for other | |
30 | DokuWiki plugins. | |
31 | ||
32 | The plugin comes with a simple admin interface where you can run your | |
33 | own SQL queries against any of the available databases. | |
34 | ||
35 | %prep | |
36 | %setup -qc | |
37 | mv *-%{plugin}-*/* . | |
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 | %install | |
45 | rm -rf $RPM_BUILD_ROOT | |
46 | install -d $RPM_BUILD_ROOT%{plugindir} | |
47 | cp -a . $RPM_BUILD_ROOT%{plugindir} | |
48 | rm -f $RPM_BUILD_ROOT%{plugindir}/{CREDITS,changelog} | |
49 | rm -f $RPM_BUILD_ROOT%{plugindir}/{COPYING,README,VERSION} | |
50 | ||
51 | # find locales | |
52 | %find_lang %{name}.lang | |
53 | ||
54 | %clean | |
55 | rm -rf $RPM_BUILD_ROOT | |
56 | ||
57 | %post | |
58 | # force css cache refresh | |
59 | if [ -f %{dokuconf}/local.php ]; then | |
60 | touch %{dokuconf}/local.php | |
61 | fi | |
62 | ||
63 | %files -f %{name}.lang | |
64 | %defattr(644,root,root,755) | |
65 | %dir %{plugindir} | |
66 | %{plugindir}/*.txt | |
67 | %{plugindir}/*.php | |
68 | %{plugindir}/db.sql |