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