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