]>
Commit | Line | Data |
---|---|---|
77628f0b ER |
1 | %define subver 2010-11-05 |
2 | %define ver %(echo %{subver} | tr -d -) | |
ef792ce5 | 3 | %define plugin eventum |
a3a4c7f1 | 4 | %define php_min_version 5.0.0 |
ef792ce5 ER |
5 | Summary: DokuWiki Eventum Plugin |
6 | Summary(pl.UTF-8): Wtyczka Include (dołączania) dla Eventum | |
7 | Name: dokuwiki-plugin-%{plugin} | |
77628f0b | 8 | Version: %{ver} |
d9566ee0 | 9 | Release: 3 |
ef792ce5 | 10 | License: GPL v2 |
6488f074 | 11 | Source0: http://github.com/glensc/dokuwiki-plugin-eventum/zipball/%{subver}?/%{plugin}-%{version}.zip |
77628f0b | 12 | # Source0-md5: ff1da92b0781e273eeb8541920c5a08e |
ef792ce5 | 13 | Group: Applications/WWW |
4e634456 ER |
14 | URL: http://www.dokuwiki.org/plugin:eventum |
15 | BuildRequires: rpmbuild(macros) >= 1.520 | |
48c899e3 | 16 | BuildRequires: unzip |
242a2a01 | 17 | Requires: dokuwiki >= 20080505 |
a3a4c7f1 ER |
18 | Requires: php(core) >= %{php_min_version} |
19 | Requires: php(date) | |
28ff99ea | 20 | Requires: php-pear-XML_RPC |
ef792ce5 ER |
21 | BuildArch: noarch |
22 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
23 | ||
642c4c93 | 24 | %define dokuconf /etc/webapps/dokuwiki |
ef792ce5 ER |
25 | %define dokudir /usr/share/dokuwiki |
26 | %define plugindir %{dokudir}/lib/plugins/%{plugin} | |
4e634456 | 27 | %define find_lang %{_usrlibrpm}/dokuwiki-find-lang.sh %{buildroot} |
ef792ce5 ER |
28 | |
29 | %description | |
242a2a01 | 30 | Adds Eventum link button to edit toolbar. |
ef792ce5 | 31 | |
1cbc2090 ER |
32 | Also adds extra info to Eventum interwiki links fetched from Eventum |
33 | via XML_RPC. | |
28ff99ea | 34 | |
ef792ce5 | 35 | %prep |
4e634456 ER |
36 | %setup -qc |
37 | mv *-%{plugin}-*/* . | |
642c4c93 | 38 | rm *-%{plugin}-*/.gitignore |
ef792ce5 | 39 | |
de06070b | 40 | version=$(awk '/date/{print $2}' plugin.info.txt) |
1cbc2090 ER |
41 | if [ "$(echo "$version" | tr -d -)" != %{version} ]; then |
42 | : %%{version} mismatch | |
43 | exit 1 | |
44 | fi | |
45 | ||
ef792ce5 ER |
46 | %install |
47 | rm -rf $RPM_BUILD_ROOT | |
48 | install -d $RPM_BUILD_ROOT%{plugindir} | |
49 | cp -a . $RPM_BUILD_ROOT%{plugindir} | |
4e634456 ER |
50 | |
51 | # find locales | |
52 | %find_lang %{name}.lang | |
ef792ce5 ER |
53 | |
54 | %clean | |
55 | rm -rf $RPM_BUILD_ROOT | |
56 | ||
642c4c93 ER |
57 | %post |
58 | # force js/css cache refresh | |
59 | if [ -f %{dokuconf}/local.php ]; then | |
60 | touch %{dokuconf}/local.php | |
61 | fi | |
62 | ||
4e634456 | 63 | %files -f %{name}.lang |
ef792ce5 ER |
64 | %defattr(644,root,root,755) |
65 | %dir %{plugindir} | |
66 | %{plugindir}/*.php | |
de06070b | 67 | %{plugindir}/*.txt |
642c4c93 | 68 | %{plugindir}/*.css |
4e634456 | 69 | %{plugindir}/conf |
642c4c93 | 70 | %{plugindir}/images |