]>
Commit | Line | Data |
---|---|---|
da24589c ER |
1 | %define subver 2021-12-31 |
2 | %define ver %(echo %{subver} | tr -d -) | |
fde2344d ER |
3 | %define plugin discussion |
4 | %define php_min_version 5.0.0 | |
fde2344d ER |
5 | Summary: DokuWiki plugin: Add a comments section to Wiki pages |
6 | Name: dokuwiki-plugin-%{plugin} | |
da24589c | 7 | Version: %{ver} |
34b02150 | 8 | Release: 1 |
fde2344d ER |
9 | License: GPL v2 |
10 | Group: Applications/WWW | |
da24589c ER |
11 | Source0: https://github.com/dokufreaks/plugin-%{plugin}/tarball/785e1e7/%{plugin}-%{version}.tar.gz |
12 | # Source0-md5: a71538b8d82fb463c73d2369c61018f7 | |
34b02150 | 13 | URL: https://www.dokuwiki.org/plugin:discussion |
fde2344d | 14 | BuildRequires: rpm-php-pearprov >= 4.4.2-11 |
c6f0f170 | 15 | BuildRequires: rpmbuild(find_lang) >= 1.41 |
fde2344d ER |
16 | BuildRequires: rpmbuild(macros) >= 1.520 |
17 | Requires: dokuwiki >= 20061106 | |
122d78f2 | 18 | Requires: php(core) >= %{php_min_version} |
679caa49 ER |
19 | Requires: php(pcre) |
20 | Requires: php(session) | |
fde2344d ER |
21 | BuildArch: noarch |
22 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
23 | ||
24 | %define dokuconf /etc/webapps/dokuwiki | |
25 | %define dokudir /usr/share/dokuwiki | |
26 | %define plugindir %{dokudir}/lib/plugins/%{plugin} | |
fde2344d ER |
27 | |
28 | # no pear deps | |
29 | %define _noautopear pear | |
30 | ||
31 | # exclude optional php dependencies | |
32 | %define _noautophp php-someext | |
33 | ||
34 | # put it together for rpmbuild | |
35 | %define _noautoreq %{?_noautophp} %{?_noautopear} | |
36 | ||
37 | %description | |
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. | |
46 | ||
47 | %prep | |
48 | %setup -qc | |
49 | mv *-%{plugin}-*/* . | |
50 | ||
51 | version=$(awk '/^date/{print $2}' plugin.info.txt) | |
52 | if [ "$(echo "$version" | tr -d -)" != %{version} ]; then | |
53 | : %%{version} mismatch | |
54 | exit 1 | |
55 | fi | |
56 | ||
57 | %install | |
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} | |
62 | ||
c6f0f170 | 63 | %find_lang %{name}.lang --with-dokuwiki |
fde2344d ER |
64 | |
65 | %clean | |
66 | rm -rf $RPM_BUILD_ROOT | |
67 | ||
68 | # use this post section if you package .css or .js files | |
69 | %post | |
70 | # force js/css cache refresh | |
71 | if [ -f %{dokuconf}/local.php ]; then | |
72 | touch %{dokuconf}/local.php | |
73 | fi | |
74 | ||
75 | %files -f %{name}.lang | |
76 | %defattr(644,root,root,755) | |
77 | %doc README | |
78 | %dir %{plugindir} | |
79 | %{plugindir}/*.css | |
80 | %{plugindir}/*.js | |
81 | %{plugindir}/*.php | |
82 | %{plugindir}/*.txt | |
83 | %{plugindir}/conf | |
84 | %{plugindir}/images | |
85 | %{plugindir}/syntax |