]>
Commit | Line | Data |
---|---|---|
7ce95b3b ER |
1 | %define plugin alertbox |
2 | Summary: Add Bootstrap style alert boxes to your wiki | |
3 | Name: dokuwiki-plugin-%{plugin} | |
4 | Version: 20150315 | |
5 | Release: 1 | |
6 | License: GPL v2 | |
7 | Group: Applications/WWW | |
8 | Source0: https://github.com/sjlevine/dokuwiki-alertbox/archive/master/%{plugin}-%{version}.tar.gz | |
9 | # Source0-md5: 3023fb439fc1b5807f97efcfe51074cb | |
10 | URL: https://www.dokuwiki.org/plugin:alertbox | |
11 | BuildRequires: rpmbuild(macros) >= 1.520 | |
12 | Requires: dokuwiki >= 20131208 | |
13 | BuildArch: noarch | |
14 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
15 | ||
16 | %define dokuconf /etc/webapps/dokuwiki | |
17 | %define dokudir /usr/share/dokuwiki | |
18 | %define plugindir %{dokudir}/lib/plugins/%{plugin} | |
19 | ||
20 | %description | |
21 | Add Bootstrap style alert boxes to your wiki. | |
22 | ||
23 | %prep | |
24 | %setup -qc | |
25 | mv dokuwiki-%{plugin}-*/* . | |
26 | ||
27 | %build | |
28 | version=$(awk '/date/{print $2}' plugin.info.txt) | |
29 | if [ "$(echo "$version" | tr -d -)" != %{version} ]; then | |
30 | : %%{version} mismatch | |
31 | exit 1 | |
32 | fi | |
33 | ||
34 | %install | |
35 | rm -rf $RPM_BUILD_ROOT | |
36 | install -d $RPM_BUILD_ROOT%{plugindir} | |
37 | cp -a . $RPM_BUILD_ROOT%{plugindir} | |
38 | %{__rm} $RPM_BUILD_ROOT%{plugindir}/README.md | |
39 | ||
40 | %clean | |
41 | rm -rf $RPM_BUILD_ROOT | |
42 | ||
43 | %post | |
44 | # force js/css cache refresh | |
45 | if [ -f %{dokuconf}/local.php ]; then | |
46 | touch %{dokuconf}/local.php | |
47 | fi | |
48 | ||
49 | %files | |
50 | %defattr(644,root,root,755) | |
51 | %doc README.md | |
52 | %dir %{plugindir} | |
53 | %{plugindir}/*.txt | |
54 | %{plugindir}/*.php | |
55 | %{plugindir}/img |