]>
Commit | Line | Data |
---|---|---|
86811ede | 1 | %define plugin sphinxsearch |
fe6c6b69 | 2 | %define php_min_version 5.1.0 |
86811ede ER |
3 | Summary: DokuWiki sphinxsearch plugin |
4 | Summary(pl.UTF-8): Wtyczka sphinxsearch dla DokuWiki | |
5 | Name: dokuwiki-plugin-%{plugin} | |
6 | Version: 0.3.3 | |
fe6c6b69 | 7 | Release: 0.3 |
86811ede ER |
8 | License: GPL v2 |
9 | Group: Applications/WWW | |
10 | Source0: http://launchpad.net/dokuwiki-sphinxsearch/0.3/%{version}/+download/sphinxsearch-%{version}.tar.gz | |
11 | # Source0-md5: 07448f7d6639431f44013708e577f45d | |
730b9e44 | 12 | Patch0: sphinxapi-pecl.patch |
86811ede | 13 | URL: http://www.dokuwiki.org/plugin:sphinxsearch |
fe6c6b69 | 14 | BuildRequires: rpm-php-pearprov >= 4.4.2-11 |
86811ede | 15 | BuildRequires: rpmbuild(macros) >= 1.520 |
86811ede | 16 | Requires: dokuwiki >= 20091225 |
5479acf5 ER |
17 | Requires: php(core) >= %{php_min_version} |
18 | Requires: php(date) | |
19 | Requires: php(pcre) | |
730b9e44 | 20 | Requires: php(sphinx) |
5479acf5 | 21 | Requires: php(sqlite) |
3529abc2 | 22 | Requires: sphinx |
86811ede ER |
23 | BuildArch: noarch |
24 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
25 | ||
26 | %define dokuconf /etc/webapps/dokuwiki | |
27 | %define dokudir /usr/share/dokuwiki | |
28 | %define plugindir %{dokudir}/lib/plugins/%{plugin} | |
29 | ||
fe6c6b69 ER |
30 | # no pear deps |
31 | %define _noautopear pear | |
32 | ||
33 | # put it together for rpmbuild | |
34 | %define _noautoreq %{?_noautophp} %{?_noautopear} | |
35 | ||
86811ede ER |
36 | %description |
37 | DokuWiki Sphinx Search plugin replaces DokuWiki's built-in search | |
38 | functionality with the Sphinx Search Engine powered search which gives | |
39 | high-performance and more relevant search results. | |
40 | ||
730b9e44 | 41 | Features: |
86811ede ER |
42 | - Google-style results (Results are shown in traditional Google-style: |
43 | title, snippet and address (document path).) | |
44 | - Filtering by namespaces (Click on namespaces in the results to see | |
730b9e44 | 45 | search only within chosen namespace |
86811ede ER |
46 | - Document sections are indexed separately (This is very useful for |
47 | those who have large pages in DokuWiki) | |
48 | ||
49 | %prep | |
50 | %setup -qc | |
51 | mv %{plugin}/* . | |
52 | rm %{plugin}/.hg_archival.txt | |
53 | rm %{plugin}/.htaccess | |
730b9e44 ER |
54 | %patch0 -p1 |
55 | ||
56 | # use system pkg | |
57 | rm sphinxapi.php | |
86811ede ER |
58 | |
59 | version=$(awk '/date/{print $2}' plugin.info.txt) | |
60 | if [ "$(echo "$version" | tr -d -)" != %{version} ]; then | |
61 | : %%{version} mismatch | |
62 | # version check blocker intentionally missing | |
63 | # exit 1 | |
64 | fi | |
65 | ||
66 | %install | |
67 | rm -rf $RPM_BUILD_ROOT | |
68 | install -d $RPM_BUILD_ROOT%{plugindir} | |
69 | cp -a . $RPM_BUILD_ROOT%{plugindir} | |
70 | rm $RPM_BUILD_ROOT%{plugindir}/{INSTALL,COPYING,changelog,sphinx.conf} | |
71 | ||
72 | %clean | |
73 | rm -rf $RPM_BUILD_ROOT | |
74 | ||
75 | %files | |
76 | %defattr(644,root,root,755) | |
77 | %doc INSTALL changelog sphinx.conf | |
78 | %dir %{plugindir} | |
79 | %{plugindir}/*.txt | |
80 | %{plugindir}/*.php | |
81 | %{plugindir}/conf |