]>
Commit | Line | Data |
---|---|---|
8c29605b ER |
1 | %define subver 2016-04-26 |
2 | %define ver %(echo %{subver} | tr -d -) | |
25b64423 ER |
3 | %define plugin comment |
4 | %define php_min_version 5.0.0 | |
25b64423 ER |
5 | Summary: DokuWiki plugin to add Add comments/notes to your wiki source |
6 | Name: dokuwiki-plugin-%{plugin} | |
8c29605b ER |
7 | Version: %{ver} |
8 | Release: 1 | |
25b64423 ER |
9 | License: GPL v2 |
10 | Group: Applications/WWW | |
8c29605b ER |
11 | Source0: https://github.com/dokufreaks/plugin-comment/archive/153b1e8c/%{plugin}-%{version}.tar.gz |
12 | # Source0-md5: 59723717caa4becfa51a6c0f02f5387c | |
13 | URL: https://www.dokuwiki.org/plugin:comment | |
25b64423 ER |
14 | BuildRequires: rpm-php-pearprov >= 4.4.2-11 |
15 | BuildRequires: rpmbuild(macros) >= 1.520 | |
8c29605b | 16 | Requires: dokuwiki >= 20131208 |
07604f0d | 17 | Requires: php(core) >= %{php_min_version} |
25b64423 ER |
18 | BuildArch: noarch |
19 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
20 | ||
21 | %define dokuconf /etc/webapps/dokuwiki | |
22 | %define dokudir /usr/share/dokuwiki | |
23 | %define plugindir %{dokudir}/lib/plugins/%{plugin} | |
24 | ||
25 | %description | |
26 | This tiny plugin allows you to leave notes to yourself (and other | |
27 | authors of your wiki) in the wiki source code that won't be shown on | |
28 | the wiki page. The syntax is like C and PHP. | |
29 | ||
30 | %prep | |
31 | %setup -qc | |
32 | mv *-%{plugin}-*/* . | |
33 | ||
8c29605b ER |
34 | %build |
35 | version=$(awk '/^date/{print $2}' plugin.info.txt) | |
36 | if [ "$(echo "$version" | tr -d '\r-')" != %{version} ]; then | |
25b64423 ER |
37 | : %%{version} mismatch |
38 | exit 1 | |
39 | fi | |
40 | ||
41 | %install | |
42 | rm -rf $RPM_BUILD_ROOT | |
43 | install -d $RPM_BUILD_ROOT%{plugindir} | |
44 | cp -a . $RPM_BUILD_ROOT%{plugindir} | |
8c29605b | 45 | %{__rm} $RPM_BUILD_ROOT%{plugindir}/{COPYING,README} |
25b64423 ER |
46 | |
47 | %clean | |
48 | rm -rf $RPM_BUILD_ROOT | |
49 | ||
50 | %files | |
51 | %defattr(644,root,root,755) | |
52 | %doc README | |
53 | %dir %{plugindir} | |
54 | %{plugindir}/*.php | |
8c29605b | 55 | %{plugindir}/*.txt |