]>
Commit | Line | Data |
---|---|---|
dbcac618 ER |
1 | %define plugin wrap |
2 | %define php_min_version 5.0.0 | |
dbcac618 ER |
3 | Summary: DokuWiki Wrap plugin |
4 | Summary(pl.UTF-8): Wtyczka Wrap dla DokuWiki | |
5 | Name: dokuwiki-plugin-%{plugin} | |
6 | Version: 20110515 | |
7 | Release: 1 | |
8 | License: GPL v2 | |
9 | Group: Applications/WWW | |
10 | Source0: http://www.dokuwiki.org/_media/plugin:dokuwiki_plugin_wrap_latest.zip#/%{plugin}-%{version}.zip | |
11 | # Source0-md5: 2fa1c6cc5cf8d6f3cefa0cc969abae05 | |
12 | URL: http://www.dokuwiki.org/plugin:wrap | |
13 | BuildRequires: rpm-php-pearprov >= 4.4.2-11 | |
14 | BuildRequires: rpmbuild(macros) >= 1.520 | |
15 | Requires: dokuwiki >= 20061106 | |
16 | Requires: php-common >= 4:%{php_min_version} | |
17 | Requires: php-pcre | |
18 | BuildArch: noarch | |
19 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
20 | ||
21 | %define dokuconf /etc/webapps/dokuwiki | |
22 | %define dokudir /usr/share/dokuwiki | |
23 | %define plugindir %{dokudir}/lib/plugins/%{plugin} | |
24 | %define find_lang %{_usrlibrpm}/dokuwiki-find-lang.sh %{buildroot} | |
25 | ||
26 | # no pear deps | |
27 | %define _noautopear pear | |
28 | ||
29 | # exclude optional php dependencies | |
30 | %define _noautophp php-someext | |
31 | ||
32 | # put it together for rpmbuild | |
33 | %define _noautoreq %{?_noautophp} %{?_noautopear} | |
34 | ||
35 | %description | |
36 | Universal plugin which combines the functionality of many other | |
37 | plugins. Wrap wiki text inside containers (divs or spans) and give | |
38 | them a class (choose from a variety of preset classes), a width and/or | |
39 | a language with its associated text direction. | |
40 | ||
41 | %prep | |
42 | %setup -qc | |
43 | mv %{plugin}/* . | |
44 | ||
45 | version=$(awk '/^date/{print $2}' plugin.info.txt) | |
46 | if [ "$(echo "$version" | tr -d -)" != %{version} ]; then | |
47 | : %%{version} mismatch | |
48 | exit 1 | |
49 | fi | |
50 | ||
51 | %install | |
52 | rm -rf $RPM_BUILD_ROOT | |
53 | install -d $RPM_BUILD_ROOT%{plugindir} | |
54 | cp -a . $RPM_BUILD_ROOT%{plugindir} | |
55 | %{__rm} $RPM_BUILD_ROOT%{plugindir}/{COPYING,README} | |
56 | ||
57 | %find_lang %{name}.lang | |
58 | ||
59 | %clean | |
60 | rm -rf $RPM_BUILD_ROOT | |
61 | ||
62 | %post | |
63 | # force js/css cache refresh | |
64 | if [ -f %{dokuconf}/local.php ]; then | |
65 | touch %{dokuconf}/local.php | |
66 | fi | |
67 | ||
68 | %files -f %{name}.lang | |
69 | %defattr(644,root,root,755) | |
70 | %doc README | |
71 | %dir %{plugindir} | |
72 | %{plugindir}/*.css | |
73 | %{plugindir}/*.php | |
74 | %{plugindir}/*.txt | |
75 | %{plugindir}/conf | |
76 | %{plugindir}/images | |
77 | %{plugindir}/syntax |