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