]>
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 | ||
83400377 ER |
23 | First, make sure you have a template that provides Bootstrap (such as |
24 | dokubootstrapsimplified or dokutwitterbootstrap)! These provide | |
25 | necessary CSS, and without them, the alert boxes won't show up. | |
26 | ||
7ce95b3b ER |
27 | %prep |
28 | %setup -qc | |
29 | mv dokuwiki-%{plugin}-*/* . | |
30 | ||
31 | %build | |
32 | version=$(awk '/date/{print $2}' plugin.info.txt) | |
33 | if [ "$(echo "$version" | tr -d -)" != %{version} ]; then | |
34 | : %%{version} mismatch | |
35 | exit 1 | |
36 | fi | |
37 | ||
38 | %install | |
39 | rm -rf $RPM_BUILD_ROOT | |
40 | install -d $RPM_BUILD_ROOT%{plugindir} | |
41 | cp -a . $RPM_BUILD_ROOT%{plugindir} | |
42 | %{__rm} $RPM_BUILD_ROOT%{plugindir}/README.md | |
43 | ||
44 | %clean | |
45 | rm -rf $RPM_BUILD_ROOT | |
46 | ||
47 | %post | |
48 | # force js/css cache refresh | |
49 | if [ -f %{dokuconf}/local.php ]; then | |
50 | touch %{dokuconf}/local.php | |
51 | fi | |
52 | ||
53 | %files | |
54 | %defattr(644,root,root,755) | |
55 | %doc README.md | |
56 | %dir %{plugindir} | |
57 | %{plugindir}/*.txt | |
58 | %{plugindir}/*.php | |
59 | %{plugindir}/img |