1 %define subver 2022-11-29
2 %define ver %(echo %{subver} | tr -d -)
4 %define php_min_version 5.3.0
5 Summary: DokuWiki helper plugin to easily access a SQLite database
6 Name: dokuwiki-plugin-%{plugin}
10 Group: Applications/WWW
11 Source0: https://github.com/cosmocode/sqlite/archive/%{subver}/%{plugin}-%{version}.tar.gz
12 # Source0-md5: b66b00f1786b2771c569a982e1f25aaf
13 URL: https://www.dokuwiki.org/plugin:sqlite
14 BuildRequires: rpm-php-pearprov >= 4.4.2-11
15 BuildRequires: rpmbuild(find_lang) >= 1.41
16 BuildRequires: rpmbuild(macros) >= 1.520
18 Requires: dokuwiki >= 20140505
19 Requires: php(core) >= %{php_min_version}
22 # you should pick one:
23 Suggests: php(pdo-sqlite)
25 Conflicts: dokuwiki-plugin-data < 20120624
27 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
29 %define dokuconf /etc/webapps/dokuwiki
30 %define dokudir /usr/share/dokuwiki
31 %define plugindir %{dokudir}/lib/plugins/%{plugin}
34 DokuWiki helper plugin to easily access a SQLite database for other
37 The plugin comes with a simple admin interface where you can run your
38 own SQL queries against any of the available databases.
42 mv %{plugin}-*/{.??*,*} .
47 version=$(awk '/date/{print $2}' plugin.info.txt)
48 if [ "$(echo "$version" | tr -d -)" != %{version} ]; then
49 : %%{version} mismatch
54 rm -rf $RPM_BUILD_ROOT
55 install -d $RPM_BUILD_ROOT%{plugindir}
56 cp -a . $RPM_BUILD_ROOT%{plugindir}
57 %{__rm} -r $RPM_BUILD_ROOT%{plugindir}/_test
58 %{__rm} $RPM_BUILD_ROOT%{plugindir}/README
61 %find_lang %{name}.lang --with-dokuwiki
64 rm -rf $RPM_BUILD_ROOT
67 # force css cache refresh
68 if [ -f %{dokuconf}/local.php ]; then
69 touch %{dokuconf}/local.php
72 %files -f %{name}.lang
73 %defattr(644,root,root,755)