]>
Commit | Line | Data |
---|---|---|
ad95144c ER |
1 | %define plugin aceeditor |
2 | %define php_min_version 5.0.0 | |
ad95144c ER |
3 | Summary: DokuWiki Ace Editor Plugin |
4 | Name: dokuwiki-plugin-%{plugin} | |
54b20f3a | 5 | Version: 20110217 |
7db2033b | 6 | Release: 2 |
ad95144c ER |
7 | License: GPL v2 |
8 | Group: Applications/WWW | |
9 | Source0: https://github.com/downloads/IOC/dokuwiki-aceeditor/%{plugin}-%{version}.tar.gz | |
54b20f3a | 10 | # Source0-md5: 5df8bd6adec5e97bf22ddc488c8325b1 |
ad95144c ER |
11 | URL: http://www.dokuwiki.org/plugin:aceeditor |
12 | BuildRequires: rpm-php-pearprov >= 4.4.2-11 | |
13 | BuildRequires: rpmbuild(macros) >= 1.520 | |
14 | Requires: dokuwiki >= 20080505 | |
7db2033b | 15 | Requires: php(core) >= %{php_min_version} |
ad95144c ER |
16 | BuildArch: noarch |
17 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
18 | ||
19 | %define dokuconf /etc/webapps/dokuwiki | |
20 | %define dokudir /usr/share/dokuwiki | |
21 | %define plugindir %{dokudir}/lib/plugins/%{plugin} | |
22 | %define find_lang %{_usrlibrpm}/dokuwiki-find-lang.sh %{buildroot} | |
23 | ||
24 | %description | |
25 | Replace textarea with Ace editor. | |
26 | ||
27 | %prep | |
28 | %setup -qc | |
29 | mv %{plugin}/* . | |
30 | ||
31 | version=$(awk '/^date/{print $2}' plugin.info.txt) | |
32 | if [ "$(echo "$version" | tr -d -)" != %{version} ]; then | |
33 | : %%{version} mismatch | |
34 | # exit 1 | |
35 | fi | |
36 | ||
37 | %install | |
38 | rm -rf $RPM_BUILD_ROOT | |
39 | install -d $RPM_BUILD_ROOT%{plugindir} | |
40 | cp -a . $RPM_BUILD_ROOT%{plugindir} | |
41 | rm $RPM_BUILD_ROOT%{plugindir}/{README,NEWS} | |
42 | ||
43 | %find_lang %{name}.lang | |
44 | ||
45 | %clean | |
46 | rm -rf $RPM_BUILD_ROOT | |
47 | ||
48 | %post | |
49 | if [ -f %{dokuconf}/local.php ]; then | |
50 | touch %{dokuconf}/local.php | |
51 | fi | |
52 | ||
53 | %files -f %{name}.lang | |
54 | %defattr(644,root,root,755) | |
55 | %doc README NEWS | |
56 | %dir %{plugindir} | |
57 | %{plugindir}/*.txt | |
58 | %{plugindir}/*.php | |
59 | %{plugindir}/*.css | |
60 | %{plugindir}/*.js | |
61 | %{plugindir}/conf | |
62 | %{plugindir}/ace |