]>
Commit | Line | Data |
---|---|---|
dd58f1fa ER |
1 | %define plugin smblink |
2 | Summary: Plugin to make Windows Share Links globally accessible | |
3 | Name: dokuwiki-plugin-%{plugin} | |
4 | Version: 20090209 | |
70e7e35a | 5 | Release: 2 |
dd58f1fa ER |
6 | License: GPL v2 |
7 | Group: Applications/WWW | |
8 | Source0: http://doku-smblink.googlecode.com/files/smblink.zip | |
9 | # Source0-md5: b880e7d257904050c97396ffbd7a9d5e | |
70e7e35a | 10 | Patch0: syntax.1.patch |
dd58f1fa ER |
11 | URL: http://wiki.splitbrain.org/plugin:smblink |
12 | BuildRequires: rpmbuild(macros) >= 1.553 | |
e6cd7292 | 13 | BuildRequires: unzip |
09bdca31 | 14 | Requires: dokuwiki >= 20091225-7 |
dd58f1fa ER |
15 | BuildArch: noarch |
16 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
17 | ||
18 | %define dokuconf /etc/webapps/dokuwiki | |
19 | %define dokudir /usr/share/dokuwiki | |
20 | %define plugindir %{dokudir}/lib/plugins/%{plugin} | |
21 | ||
22 | %description | |
23 | A replacement for DokuWiki's default Windows Share Link feature which | |
24 | supports Firefox-like browsers. | |
25 | ||
26 | This plugin replaces the default action of Windows Share Links (WSL) | |
27 | to better support the Firefox browser. | |
28 | ||
29 | %prep | |
30 | %setup -qc | |
31 | mv %{plugin}/* . | |
32 | %undos *.php | |
70e7e35a | 33 | %patch0 -p0 |
dd58f1fa ER |
34 | |
35 | version=$(awk -F"'" '/date/{print $4}' syntax.php) | |
36 | if [ "$(echo "$version" | tr -d -)" != %{version} ]; then | |
37 | : %%{version} mismatch | |
38 | exit 1 | |
39 | fi | |
40 | ||
09bdca31 ER |
41 | cat <<'EOF' > script.js |
42 | addInitEvent(function() { | |
43 | // Reset warning as we now handle the links for all OS | |
44 | LANG['nosmblinks'] = ''; | |
45 | }); | |
46 | EOF | |
47 | ||
dd58f1fa ER |
48 | %install |
49 | rm -rf $RPM_BUILD_ROOT | |
50 | install -d $RPM_BUILD_ROOT%{plugindir} | |
51 | cp -a . $RPM_BUILD_ROOT%{plugindir} | |
52 | ||
53 | %clean | |
54 | rm -rf $RPM_BUILD_ROOT | |
55 | ||
56 | %post | |
57 | # force css cache refresh | |
58 | if [ -f %{dokuconf}/local.php ]; then | |
59 | touch %{dokuconf}/local.php | |
60 | fi | |
61 | ||
62 | %files | |
63 | %defattr(644,root,root,755) | |
64 | %dir %{plugindir} | |
65 | %{plugindir}/*.php | |
09bdca31 | 66 | %{plugindir}/*.js |