]>
Commit | Line | Data |
---|---|---|
1 | # $Revision: 1.4 $, $Date: 2012/06/24 21:00:53 $ | |
2 | %define plugin sqlite | |
3 | %define php_min_version 5.0.0 | |
4 | %include /usr/lib/rpm/macros.php | |
5 | Summary: DokuWiki helper plugin to easily access a SQLite database | |
6 | Name: dokuwiki-plugin-%{plugin} | |
7 | Version: 20120704 | |
8 | Release: 1 | |
9 | License: GPL v2 | |
10 | Group: Applications/WWW | |
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 | |
14 | URL: http://www.dokuwiki.org/plugin:sqlite | |
15 | BuildRequires: rpm-php-pearprov >= 4.4.2-11 | |
16 | BuildRequires: rpmbuild(macros) >= 1.520 | |
17 | BuildRequires: unzip | |
18 | Requires: dokuwiki >= 20091225 | |
19 | Requires: php-common >= 4:%{php_min_version} | |
20 | Requires: php-date | |
21 | Requires: php-pcre | |
22 | # you should pick one: | |
23 | Suggests: php-pdo-sqlite | |
24 | Suggests: php-sqlite | |
25 | Conflicts: dokuwiki-plugin-data < 20120624 | |
26 | BuildArch: noarch | |
27 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
28 | ||
29 | %define dokuconf /etc/webapps/dokuwiki | |
30 | %define dokudir /usr/share/dokuwiki | |
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 | |
47 | # exit 1 | |
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} | |
54 | rm $RPM_BUILD_ROOT%{plugindir}/README | |
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) | |
70 | %doc README | |
71 | %dir %{plugindir} | |
72 | %{plugindir}/*.txt | |
73 | %{plugindir}/*.css | |
74 | %{plugindir}/*.php | |
75 | %{plugindir}/db.sql |