]>
Commit | Line | Data |
---|---|---|
5eeeecfb ER |
1 | %define subver 2016-08-10 |
2 | %define ver %(echo %{subver} | tr -d -) | |
f72f606b | 3 | %define plugin sqlite |
5eeeecfb | 4 | %define php_min_version 5.3.0 |
f54b83da | 5 | %include /usr/lib/rpm/macros.php |
f72f606b ER |
6 | Summary: DokuWiki helper plugin to easily access a SQLite database |
7 | Name: dokuwiki-plugin-%{plugin} | |
5eeeecfb ER |
8 | Version: %{ver} |
9 | Release: 0.1 | |
f72f606b ER |
10 | License: GPL v2 |
11 | Group: Applications/WWW | |
5eeeecfb ER |
12 | Source0: https://github.com/cosmocode/sqlite/archive/da9a21e/%{plugin}-%{version}.tar.gz |
13 | # Source0-md5: 919e54158e1fa924d74dd6b7e17424e7 | |
f54b83da | 14 | URL: http://www.dokuwiki.org/plugin:sqlite |
84e4360e | 15 | BuildRequires: rpm-php-pearprov >= 4.4.2-11 |
f72f606b | 16 | BuildRequires: rpmbuild(macros) >= 1.520 |
fba8e7d5 | 17 | BuildRequires: unzip |
5eeeecfb | 18 | Requires: dokuwiki >= 20140505 |
ce900ea6 | 19 | Requires: php(core) >= %{php_min_version} |
5e5682eb | 20 | Requires: php(date) |
eaf6c031 | 21 | Requires: php(pcre) |
027a96c1 | 22 | # you should pick one: |
5eeeecfb ER |
23 | Suggests: php(pdo-sqlite) |
24 | Suggests: php(sqlite) | |
027a96c1 | 25 | Conflicts: dokuwiki-plugin-data < 20120624 |
f72f606b ER |
26 | BuildArch: noarch |
27 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
28 | ||
29 | %define dokuconf /etc/webapps/dokuwiki | |
f54b83da | 30 | %define dokudir /usr/share/dokuwiki |
f72f606b ER |
31 | %define plugindir %{dokudir}/lib/plugins/%{plugin} |
32 | %define find_lang %{_usrlibrpm}/dokuwiki-find-lang.sh %{buildroot} | |
33 | ||
34 | %description | |
35 | DokuWiki helper plugin to easily access a SQLite database for other | |
36 | DokuWiki plugins. | |
37 | ||
38 | The plugin comes with a simple admin interface where you can run your | |
39 | own SQL queries against any of the available databases. | |
40 | ||
41 | %prep | |
42 | %setup -qc | |
5eeeecfb ER |
43 | mv %{plugin}-*/* . |
44 | ||
45 | %build | |
f72f606b ER |
46 | version=$(awk '/date/{print $2}' plugin.info.txt) |
47 | if [ "$(echo "$version" | tr -d -)" != %{version} ]; then | |
48 | : %%{version} mismatch | |
5eeeecfb | 49 | exit 1 |
f72f606b ER |
50 | fi |
51 | ||
52 | %install | |
53 | rm -rf $RPM_BUILD_ROOT | |
54 | install -d $RPM_BUILD_ROOT%{plugindir} | |
55 | cp -a . $RPM_BUILD_ROOT%{plugindir} | |
1161462c | 56 | rm $RPM_BUILD_ROOT%{plugindir}/README |
f72f606b ER |
57 | |
58 | # find locales | |
59 | %find_lang %{name}.lang | |
60 | ||
61 | %clean | |
62 | rm -rf $RPM_BUILD_ROOT | |
63 | ||
64 | %post | |
65 | # force css cache refresh | |
66 | if [ -f %{dokuconf}/local.php ]; then | |
67 | touch %{dokuconf}/local.php | |
68 | fi | |
69 | ||
70 | %files -f %{name}.lang | |
71 | %defattr(644,root,root,755) | |
1161462c | 72 | %doc README |
f72f606b ER |
73 | %dir %{plugindir} |
74 | %{plugindir}/*.txt | |
f54b83da | 75 | %{plugindir}/*.css |
f72f606b ER |
76 | %{plugindir}/*.php |
77 | %{plugindir}/db.sql |