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