]>
Commit | Line | Data |
---|---|---|
d7fe6576 ER |
1 | %define plugin nbsp |
2 | Summary: DokuWiki Syntax plugin for Non-breaking Space | |
3 | Name: dokuwiki-plugin-%{plugin} | |
4 | Version: 20081122 | |
5 | Release: 1 | |
6 | License: GPL v2 | |
7 | Group: Applications/WWW | |
8 | Source0: http://dev.mwat.de/dw/syntax_plugin_nbsp.zip | |
9 | # Source0-md5: 10c5b0f226652cd70af15246cae75401 | |
10 | URL: http://www.dokuwiki.org/plugin:nbsp | |
11 | BuildRequires: rpmbuild(macros) >= 1.520 | |
12 | Requires: dokuwiki >= 20050713 | |
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 | A Syntax plugin to insert Non-breaking Space in documents. | |
22 | ||
23 | %prep | |
24 | %setup -qc | |
25 | mv %{plugin}/* . | |
26 | ||
27 | version=$(awk -F"'" '/date.*=>/{print $4}' syntax.php) | |
28 | if [ "$(echo "$version" | tr -d -)" != %{version} ]; then | |
29 | : %%{version} mismatch | |
30 | exit 1 | |
31 | fi | |
32 | ||
33 | %install | |
34 | rm -rf $RPM_BUILD_ROOT | |
35 | install -d $RPM_BUILD_ROOT%{plugindir} | |
36 | cp -a . $RPM_BUILD_ROOT%{plugindir} | |
37 | ||
38 | %clean | |
39 | rm -rf $RPM_BUILD_ROOT | |
40 | ||
41 | %post | |
42 | # force css cache refresh | |
43 | if [ -f %{dokuconf}/local.php ]; then | |
44 | touch %{dokuconf}/local.php | |
45 | fi | |
46 | ||
47 | %files | |
48 | %defattr(644,root,root,755) | |
49 | %dir %{plugindir} | |
50 | %{plugindir}/*.php |