]>
Commit | Line | Data |
---|---|---|
f72f606b | 1 | %define plugin sqlite |
f54b83da ER |
2 | %define php_min_version 5.0.0 |
3 | %include /usr/lib/rpm/macros.php | |
f72f606b ER |
4 | Summary: DokuWiki helper plugin to easily access a SQLite database |
5 | Name: dokuwiki-plugin-%{plugin} | |
f54b83da | 6 | Version: 20120131 |
f72f606b ER |
7 | Release: 1 |
8 | License: GPL v2 | |
9 | Group: Applications/WWW | |
f54b83da ER |
10 | Source0: https://github.com/cosmocode/sqlite/tarball/master/%{plugin}-%{version}.tgz |
11 | # Source0-md5: 2145ad75c6f9c3602b9570e631bb99b2 | |
12 | URL: http://www.dokuwiki.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 | |
f54b83da | 25 | %define dokudir /usr/share/dokuwiki |
f72f606b ER |
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} | |
f72f606b ER |
49 | |
50 | # find locales | |
51 | %find_lang %{name}.lang | |
52 | ||
53 | %clean | |
54 | rm -rf $RPM_BUILD_ROOT | |
55 | ||
56 | %post | |
57 | # force css cache refresh | |
58 | if [ -f %{dokuconf}/local.php ]; then | |
59 | touch %{dokuconf}/local.php | |
60 | fi | |
61 | ||
62 | %files -f %{name}.lang | |
63 | %defattr(644,root,root,755) | |
64 | %dir %{plugindir} | |
65 | %{plugindir}/*.txt | |
f54b83da | 66 | %{plugindir}/*.css |
f72f606b ER |
67 | %{plugindir}/*.php |
68 | %{plugindir}/db.sql |