2 Summary: DokuWiki Eventum Plugin
3 Summary(pl.UTF-8): Wtyczka Include (dołączania) dla Eventum
4 Name: dokuwiki-plugin-%{plugin}
8 Group: Applications/WWW
9 URL: https://cvs.delfi.ee/dokuwiki/plugin/eventum/
10 Requires: dokuwiki >= 20080505
11 Requires: php-pear-XML_RPC
13 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
15 %define dokudir /usr/share/dokuwiki
16 %define plugindir %{dokudir}/lib/plugins/%{plugin}
18 %define _cvsroot :ext:cvs.delfi.ee:/usr/local/cvs
19 %define _cvsmodule dokuwiki/plugin/eventum
22 Adds Eventum link button to edit toolbar.
24 Also adds extra info to Eventum interwiki links fetched from Eventum via
28 # check early if build is ok to be performed
29 %if %{!?debug:1}%{?debug:0} && %{!?_cvstag:1}%{?_cvstag:0} && %([[ %{release} = *.* ]] && echo 0 || echo 1)
30 # break if spec is not commited
32 if [ "$(cvs status %{name}.spec | awk '/Status:/{print $NF}')" != "Up-to-date" ]; then
33 : "Integer build not allowed: %{name}.spec is not up-to-date with CVS"
40 cvs -d %{_cvsroot} co %{?_cvstag:-r %{_cvstag}} -d %{name}-%{version} -P %{_cvsmodule}
44 # skip tagging if we checkouted from tag or have debug enabled
45 # also make make tag only if we have integer release
46 %if %{!?debug:1}%{?debug:0} && %{!?_cvstag:1}%{?_cvstag:0} && %([[ %{release} = *.* ]] && echo 0 || echo 1)
47 # do tagging by version
48 tag=%{name}-%(echo %{version} | tr . _)-%(echo %{release} | tr . _)
51 if [ $(cvs status -v %{name}.spec | egrep -c "$tag[[:space:]]") != 0 ]; then
52 : "Tag $tag already exists"
55 cvs tag $tag %{name}.spec
61 rm -rf $RPM_BUILD_ROOT
62 install -d $RPM_BUILD_ROOT%{plugindir}
63 cp -a . $RPM_BUILD_ROOT%{plugindir}
64 find $RPM_BUILD_ROOT%{plugindir} -name CVS | xargs -r rm -rf
66 # link issue -> eventum icon
67 install -d $RPM_BUILD_ROOT%{dokudir}/lib/images/interwiki
68 ln -s eventum.gif $RPM_BUILD_ROOT%{dokudir}/lib/images/interwiki/issue.gif
71 rm -rf $RPM_BUILD_ROOT
74 %defattr(644,root,root,755)
77 %dir %{plugindir}/lang
78 %dir %{plugindir}/lang/en
79 %{plugindir}/lang/en/lang.php
82 %{dokudir}/lib/images/interwiki/issue.gif