]>
Commit | Line | Data |
---|---|---|
e336b0ce ER |
1 | %define plugin yql |
2 | %define php_min_version 5.0.0 | |
e336b0ce ER |
3 | Summary: A plugin for embedding results of the Yahoo! YQL query API in a page |
4 | Name: dokuwiki-plugin-%{plugin} | |
5 | Version: 20110703 | |
6 | Release: 0.1 | |
7 | License: GPL v2 | |
8 | Group: Applications/WWW | |
9 | Source0: http://github.com/Michitux/dokuwiki-plugin-yql/tarball/master#/%{plugin}.tgz | |
10 | # Source0-md5: b409b0a93659d7b0c36efd6e8cd0a312 | |
11 | URL: http://www.dokuwiki.org/plugin:yql | |
12 | BuildRequires: rpm-php-pearprov >= 4.4.2-11 | |
13 | BuildRequires: rpmbuild(macros) >= 1.520 | |
14 | Requires: dokuwiki >= 20090214 | |
15 | Requires: php-common >= 4:%{php_min_version} | |
16 | Requires: php-pcre | |
17 | BuildArch: noarch | |
18 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
19 | ||
20 | %define dokuconf /etc/webapps/dokuwiki | |
21 | %define dokudir /usr/share/dokuwiki | |
22 | %define plugindir %{dokudir}/lib/plugins/%{plugin} | |
23 | ||
24 | %description | |
25 | This plugin allows to embed results from the YQL (Yahoo! Query | |
26 | Language) API of Yahoo! in a wiki page. The plugin only works for | |
27 | certain queries and certain query fields and has mainly been created | |
28 | because I needed to embed a certain query result. The plugin does not | |
29 | support queries that need authorization or return one single result | |
30 | (and not a list of results). It is recommended that you try out your | |
31 | query in the YQL Console in order to find the necessary parameters for | |
32 | the plugin. | |
33 | ||
34 | %prep | |
35 | %setup -qc | |
36 | mv *-%{plugin}-*/* . | |
37 | ||
38 | version=$(awk '/^date/{print $2}' plugin.info.txt) | |
39 | if [ "$(echo "$version" | tr -d -)" != %{version} ]; then | |
40 | : %%{version} mismatch | |
41 | exit 1 | |
42 | fi | |
43 | ||
44 | %install | |
45 | rm -rf $RPM_BUILD_ROOT | |
46 | install -d $RPM_BUILD_ROOT%{plugindir} | |
47 | cp -a . $RPM_BUILD_ROOT%{plugindir} | |
48 | %{__rm} $RPM_BUILD_ROOT%{plugindir}/example_usage.png | |
49 | ||
50 | %clean | |
51 | rm -rf $RPM_BUILD_ROOT | |
52 | ||
53 | %files | |
54 | %defattr(644,root,root,755) | |
55 | %dir %{plugindir} | |
56 | %{plugindir}/*.php | |
57 | %{plugindir}/*.txt |