1 %define subver 2021-12-31
2 %define ver %(echo %{subver} | tr -d -)
3 %define plugin discussion
4 %define php_min_version 5.0.0
5 Summary: DokuWiki plugin: Add a comments section to Wiki pages
6 Name: dokuwiki-plugin-%{plugin}
10 Group: Applications/WWW
11 Source0: https://github.com/dokufreaks/plugin-%{plugin}/tarball/785e1e7/%{plugin}-%{version}.tar.gz
12 # Source0-md5: a71538b8d82fb463c73d2369c61018f7
13 URL: https://www.dokuwiki.org/plugin:discussion
14 BuildRequires: rpm-php-pearprov >= 4.4.2-11
15 BuildRequires: rpmbuild(find_lang) >= 1.41
16 BuildRequires: rpmbuild(macros) >= 1.520
17 Requires: dokuwiki >= 20061106
18 Requires: php(core) >= %{php_min_version}
20 Requires: php(session)
22 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
24 %define dokuconf /etc/webapps/dokuwiki
25 %define dokudir /usr/share/dokuwiki
26 %define plugindir %{dokudir}/lib/plugins/%{plugin}
29 %define _noautopear pear
31 # exclude optional php dependencies
32 %define _noautophp php-someext
34 # put it together for rpmbuild
35 %define _noautoreq %{?_noautophp} %{?_noautopear}
38 The Discussion Plugin adds a discussion section after your wiki page
39 for user comments. This is useful to separate page content and the
40 discussion thereof and also, if you don't want to give normal users
41 the right to edit the page but still want user contributed notes. A
42 second component of this plugin shows a list of all pages in a
43 namespace with a discussion section (called discussion threads)
44 ordered by most recent comments. This allows you to create a very
45 simple discussion forum in your wiki.
51 version=$(awk '/^date/{print $2}' plugin.info.txt)
52 if [ "$(echo "$version" | tr -d -)" != %{version} ]; then
53 : %%{version} mismatch
58 rm -rf $RPM_BUILD_ROOT
59 install -d $RPM_BUILD_ROOT%{plugindir}
60 cp -a . $RPM_BUILD_ROOT%{plugindir}
61 %{__rm} $RPM_BUILD_ROOT%{plugindir}/{COPYING,README}
63 %find_lang %{name}.lang --with-dokuwiki
66 rm -rf $RPM_BUILD_ROOT
68 # use this post section if you package .css or .js files
70 # force js/css cache refresh
71 if [ -f %{dokuconf}/local.php ]; then
72 touch %{dokuconf}/local.php
75 %files -f %{name}.lang
76 %defattr(644,root,root,755)