]>
Commit | Line | Data |
---|---|---|
1 | %define plugin searchindex | |
2 | %define php_min_version 5.0.0 | |
3 | Summary: DokuWiki Searchindex Manager | |
4 | Summary(pl.UTF-8): Zarządca indeksu wyszukiwania dla DokuWiki | |
5 | Name: dokuwiki-plugin-%{plugin} | |
6 | Version: 20110502 | |
7 | Release: 7 | |
8 | License: GPL v2 | |
9 | Group: Applications/WWW | |
10 | Source0: http://github.com/splitbrain/dokuwiki-plugin-%{plugin}/zipball/master/%{plugin}.zip | |
11 | # Source0-md5: ecf9e27851b6ef33df6e75ce144076a5 | |
12 | URL: http://www.dokuwiki.org/plugin:searchindex | |
13 | BuildRequires: rpm-php-pearprov >= 4.4.2-11 | |
14 | BuildRequires: rpmbuild(macros) >= 1.520 | |
15 | Requires: dokuwiki >= 20090214 | |
16 | Requires: php(core) >= %{php_min_version} | |
17 | Requires: php(date) | |
18 | Requires: php(session) | |
19 | BuildArch: noarch | |
20 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
21 | ||
22 | %define dokuconf /etc/webapps/dokuwiki | |
23 | %define dokudir /usr/share/dokuwiki | |
24 | %define plugindir %{dokudir}/lib/plugins/%{plugin} | |
25 | %define find_lang %{_usrlibrpm}/dokuwiki-find-lang.sh %{buildroot} | |
26 | ||
27 | %description | |
28 | This admin plugin allows you to rebuild the index used by the fulltext | |
29 | search. This isn't needed generally as the index builds and updates | |
30 | itself while users browse your wiki. However if you just upgraded, | |
31 | added or removed a lot of files it may be a good idea to cleanup the | |
32 | index. | |
33 | ||
34 | This Plugin needs a recent Browser as it makes use of modern | |
35 | JavaScript to carry out multiple tasks in the background (using AJAX). | |
36 | ||
37 | %description -l pl.UTF-8 | |
38 | Wtyczka administratora pozwalająca przebudować indeks używany przez | |
39 | wyszukiwanie pełnotekstowe. Nie jest niezbędna w ogólnym przypadku, | |
40 | jako że indeks buduje się i uaktualnia sam w czasie przeglądania wiki. | |
41 | Jednakże po uaktualnieniu, dodaniu lub usunięciu wielu plików | |
42 | wyczyszczenie indeksu może być dobrym pomysłem. | |
43 | ||
44 | Wtyczka ta wymaga aktualnej przeglądarki, jako że wykorzystuje nową | |
45 | wersję JavaScriptu do wykonywania wielu zadań w tle (z użyciem | |
46 | AJAX-a). | |
47 | ||
48 | %prep | |
49 | %setup -qc | |
50 | # for githug urls: | |
51 | mv *-%{plugin}-*/* . | |
52 | ||
53 | version=$(awk '/^date/{print $2}' plugin.info.txt) | |
54 | if [ "$(echo "$version" | tr -d -)" != %{version} ]; then | |
55 | : %%{version} mismatch | |
56 | exit 1 | |
57 | fi | |
58 | ||
59 | %install | |
60 | rm -rf $RPM_BUILD_ROOT | |
61 | install -d $RPM_BUILD_ROOT%{plugindir} | |
62 | cp -a . $RPM_BUILD_ROOT%{plugindir} | |
63 | %{__rm} $RPM_BUILD_ROOT%{plugindir}/README | |
64 | ||
65 | %find_lang %{name}.lang | |
66 | ||
67 | %clean | |
68 | rm -rf $RPM_BUILD_ROOT | |
69 | ||
70 | %post | |
71 | # force js/css cache refresh | |
72 | if [ -f %{dokuconf}/local.php ]; then | |
73 | touch %{dokuconf}/local.php | |
74 | fi | |
75 | ||
76 | %files -f %{name}.lang | |
77 | %defattr(644,root,root,755) | |
78 | %doc README | |
79 | %dir %{plugindir} | |
80 | %{plugindir}/*.css | |
81 | %{plugindir}/*.js | |
82 | %{plugindir}/*.php | |
83 | %{plugindir}/*.txt |