]>
Commit | Line | Data |
---|---|---|
b88778a1 ER |
1 | # TODO |
2 | # - use system ditaa jar | |
3 | %define plugin ditaa | |
4 | Summary: Converts ASCII-Flowcharts to png-Graphics using ditaa | |
5 | Name: dokuwiki-plugin-%{plugin} | |
461dc023 ER |
6 | Version: 20100829 |
7 | Release: 1 | |
b88778a1 ER |
8 | License: GPL v2 |
9 | Group: Applications/WWW | |
461dc023 ER |
10 | Source0: http://github.com/splitbrain/%{name}/tarball/master#/%{plugin}.zip |
11 | # Source0-md5: 34c9823290bee81ecb8694b302000401 | |
b88778a1 ER |
12 | URL: http://wiki.splitbrain.org/plugin:ditaa |
13 | BuildRequires: rpmbuild(macros) >= 1.520 | |
cbbb3d31 | 14 | BuildRequires: unzip |
b88778a1 ER |
15 | Requires: dokuwiki >= 20091225 |
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 | Ditaa is a tool to convert ASCII-Art flowcharts and diagrams into | |
26 | their graphical equivalents. This Plugin integrates this feature into | |
27 | DokuWiki. | |
28 | ||
29 | You need java installed locally to use local rendering, it defaults to | |
30 | render via <http://ditaa.org>. | |
31 | ||
32 | %prep | |
33 | %setup -qc | |
34 | # for githug urls: | |
35 | mv *-%{plugin}-*/* . | |
36 | ||
37 | version=$(awk '/date/{print $2}' plugin.info.txt) | |
38 | if [ "$(echo "$version" | tr -d -)" != %{version} ]; then | |
39 | : %%{version} mismatch | |
40 | exit 1 | |
41 | fi | |
42 | ||
43 | # ditaa license and history not useful here | |
44 | rm ditaa/COPYING | |
45 | rm ditaa/HISTORY | |
46 | ||
47 | %install | |
48 | rm -rf $RPM_BUILD_ROOT | |
49 | install -d $RPM_BUILD_ROOT%{plugindir} | |
50 | cp -a . $RPM_BUILD_ROOT%{plugindir} | |
51 | ||
52 | ||
53 | # find locales | |
54 | %find_lang %{name}.lang | |
55 | ||
56 | %clean | |
57 | rm -rf $RPM_BUILD_ROOT | |
58 | ||
59 | %post | |
60 | # force css cache refresh | |
61 | if [ -f %{dokuconf}/local.php ]; then | |
62 | touch %{dokuconf}/local.php | |
63 | fi | |
64 | ||
65 | %files -f %{name}.lang | |
66 | %defattr(644,root,root,755) | |
67 | %dir %{plugindir} | |
68 | %{plugindir}/conf | |
69 | %{plugindir}/*.txt | |
70 | %{plugindir}/*.php | |
461dc023 | 71 | %{plugindir}/broken.png |
b88778a1 ER |
72 | |
73 | # TODO: system pkg | |
74 | %dir %{plugindir}/ditaa | |
75 | %{plugindir}/ditaa/ditaa0_9.jar |