]>
Commit | Line | Data |
---|---|---|
1 | %define subver 2018-04-28 | |
2 | %define ver %(echo %{subver} | tr -d -) | |
3 | %define plugin note | |
4 | %define php_min_version 5.3.0 | |
5 | Summary: DokuWiki note plugin | |
6 | Name: dokuwiki-plugin-%{plugin} | |
7 | Version: %{ver} | |
8 | Release: 1 | |
9 | License: GPL v2 | |
10 | Group: Applications/WWW | |
11 | Source0: https://github.com/LarsGit223/dokuwiki_note/archive/%{subver}/%{plugin}-%{subver}.tar.gz | |
12 | # Source0-md5: 827086b608ae9a2f5ce49dade8b4ed75 | |
13 | Patch0: toc-fix.patch | |
14 | URL: https://www.dokuwiki.org/plugin:note | |
15 | BuildRequires: rpmbuild(macros) >= 1.520 | |
16 | Requires: dokuwiki >= 20090214 | |
17 | BuildArch: noarch | |
18 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
19 | ||
20 | %define dokuconf /etc/webapps/dokuwiki | |
21 | %define dokudir /usr/share/dokuwiki | |
22 | %define plugindir %{dokudir}/lib/plugins/%{plugin} | |
23 | ||
24 | %description | |
25 | This plugin allows you to create nice notes in your DokuWiki pages. | |
26 | ||
27 | %prep | |
28 | %setup -qc | |
29 | mv dokuwiki_note-*/* . | |
30 | %patch0 -p1 | |
31 | ||
32 | %build | |
33 | version=$(awk '/^date/{print $2}' plugin.info.txt) | |
34 | if [ "$(echo "$version" | tr -d -)" != %{version} ]; then | |
35 | : %%{version} mismatch | |
36 | exit 1 | |
37 | fi | |
38 | ||
39 | %install | |
40 | rm -rf $RPM_BUILD_ROOT | |
41 | install -d $RPM_BUILD_ROOT%{plugindir} | |
42 | cp -a . $RPM_BUILD_ROOT%{plugindir} | |
43 | %{__rm} $RPM_BUILD_ROOT%{plugindir}/{COPYING,README.rdoc} | |
44 | ||
45 | %clean | |
46 | rm -rf $RPM_BUILD_ROOT | |
47 | ||
48 | %post | |
49 | # force js/css cache refresh | |
50 | if [ -f %{dokuconf}/local.php ]; then | |
51 | touch %{dokuconf}/local.php | |
52 | fi | |
53 | ||
54 | %files | |
55 | %defattr(644,root,root,755) | |
56 | %doc README.rdoc | |
57 | %dir %{plugindir} | |
58 | %{plugindir}/*.txt | |
59 | %{plugindir}/*.php | |
60 | %{plugindir}/*.css | |
61 | %{plugindir}/*.js | |
62 | %{plugindir}/images |