]>
Commit | Line | Data |
---|---|---|
027a96c1 | 1 | # $Revision: 1.4 $, $Date: 2012/06/24 21:00:53 $ |
f72f606b | 2 | %define plugin sqlite |
f54b83da ER |
3 | %define php_min_version 5.0.0 |
4 | %include /usr/lib/rpm/macros.php | |
f72f606b ER |
5 | Summary: DokuWiki helper plugin to easily access a SQLite database |
6 | Name: dokuwiki-plugin-%{plugin} | |
027a96c1 | 7 | Version: 20120704 |
eaf6c031 | 8 | Release: 5 |
f72f606b ER |
9 | License: GPL v2 |
10 | Group: Applications/WWW | |
027a96c1 ER |
11 | #Source0: https://github.com/cosmocode/sqlite/tarball/pdo/%{plugin}-pdo-%{version}.tgz |
12 | Source0: https://github.com/Klap-in/sqlite/tarball/pdo/%{plugin}-pdo-%{version}.tgz | |
13 | # Source0-md5: 8aae9339ea785655d7c4340b8eb8de37 | |
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 |
f72f606b | 18 | Requires: dokuwiki >= 20091225 |
eaf6c031 | 19 | Requires: php(pcre) |
f72f606b ER |
20 | Requires: php-common >= 4:%{php_min_version} |
21 | Requires: php-date | |
027a96c1 ER |
22 | # you should pick one: |
23 | Suggests: php-pdo-sqlite | |
24 | Suggests: php-sqlite | |
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 | |
43 | mv *-%{plugin}-*/* . | |
44 | version=$(awk '/date/{print $2}' plugin.info.txt) | |
45 | if [ "$(echo "$version" | tr -d -)" != %{version} ]; then | |
46 | : %%{version} mismatch | |
027a96c1 | 47 | # exit 1 |
f72f606b ER |
48 | fi |
49 | ||
50 | %install | |
51 | rm -rf $RPM_BUILD_ROOT | |
52 | install -d $RPM_BUILD_ROOT%{plugindir} | |
53 | cp -a . $RPM_BUILD_ROOT%{plugindir} | |
1161462c | 54 | rm $RPM_BUILD_ROOT%{plugindir}/README |
f72f606b ER |
55 | |
56 | # find locales | |
57 | %find_lang %{name}.lang | |
58 | ||
59 | %clean | |
60 | rm -rf $RPM_BUILD_ROOT | |
61 | ||
62 | %post | |
63 | # force css cache refresh | |
64 | if [ -f %{dokuconf}/local.php ]; then | |
65 | touch %{dokuconf}/local.php | |
66 | fi | |
67 | ||
68 | %files -f %{name}.lang | |
69 | %defattr(644,root,root,755) | |
1161462c | 70 | %doc README |
f72f606b ER |
71 | %dir %{plugindir} |
72 | %{plugindir}/*.txt | |
f54b83da | 73 | %{plugindir}/*.css |
f72f606b ER |
74 | %{plugindir}/*.php |
75 | %{plugindir}/db.sql |