]>
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 | |
84e4360e | 13 | BuildRequires: rpm-php-pearprov >= 4.4.2-11 |
f72f606b | 14 | BuildRequires: rpmbuild(macros) >= 1.520 |
fba8e7d5 | 15 | BuildRequires: unzip |
f72f606b ER |
16 | Requires: dokuwiki >= 20091225 |
17 | Requires: php-common >= 4:%{php_min_version} | |
18 | Requires: php-date | |
19 | Requires: php-pcre | |
20 | Requires: php-sqlite | |
21 | BuildArch: noarch | |
22 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
23 | ||
24 | %define dokuconf /etc/webapps/dokuwiki | |
25 | %define dokudir /usr/share/dokuwiki | |
26 | %define plugindir %{dokudir}/lib/plugins/%{plugin} | |
27 | %define find_lang %{_usrlibrpm}/dokuwiki-find-lang.sh %{buildroot} | |
28 | ||
29 | %description | |
30 | DokuWiki helper plugin to easily access a SQLite database for other | |
31 | DokuWiki plugins. | |
32 | ||
33 | The plugin comes with a simple admin interface where you can run your | |
34 | own SQL queries against any of the available databases. | |
35 | ||
36 | %prep | |
37 | %setup -qc | |
38 | mv *-%{plugin}-*/* . | |
39 | version=$(awk '/date/{print $2}' plugin.info.txt) | |
40 | if [ "$(echo "$version" | tr -d -)" != %{version} ]; then | |
41 | : %%{version} mismatch | |
42 | exit 1 | |
43 | fi | |
44 | ||
45 | %install | |
46 | rm -rf $RPM_BUILD_ROOT | |
47 | install -d $RPM_BUILD_ROOT%{plugindir} | |
48 | cp -a . $RPM_BUILD_ROOT%{plugindir} | |
49 | rm -f $RPM_BUILD_ROOT%{plugindir}/{CREDITS,changelog} | |
50 | rm -f $RPM_BUILD_ROOT%{plugindir}/{COPYING,README,VERSION} | |
51 | ||
52 | # find locales | |
53 | %find_lang %{name}.lang | |
54 | ||
55 | %clean | |
56 | rm -rf $RPM_BUILD_ROOT | |
57 | ||
58 | %post | |
59 | # force css cache refresh | |
60 | if [ -f %{dokuconf}/local.php ]; then | |
61 | touch %{dokuconf}/local.php | |
62 | fi | |
63 | ||
64 | %files -f %{name}.lang | |
65 | %defattr(644,root,root,755) | |
66 | %dir %{plugindir} | |
67 | %{plugindir}/*.txt | |
68 | %{plugindir}/*.php | |
69 | %{plugindir}/db.sql |