]> git.pld-linux.org Git - packages/dokuwiki-plugin-poldek.git/blob - dokuwiki-plugin-poldek.spec
- egrep is deprecated (use grep -E)
[packages/dokuwiki-plugin-poldek.git] / dokuwiki-plugin-poldek.spec
1 %define         plugin          poldek
2 Summary:        DokuWiki poldek Plugin
3 Summary(pl.UTF-8):      Wtyczka Include (dołączania) dla poldek
4 Name:           dokuwiki-plugin-%{plugin}
5 Version:        20090129
6 Release:        1
7 License:        GPL v2
8 Group:          Applications/WWW
9 URL:            https://cvs.delfi.ee/dokuwiki/plugin/poldek/
10 Requires:       dokuwiki >= 20080505
11 Requires:       poldek
12 BuildArch:      noarch
13 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
14
15 %define         dokudir         /usr/share/dokuwiki
16 %define         plugindir       %{dokudir}/lib/plugins/%{plugin}
17
18 %define         _cvsroot        :ext:cvs.delfi.ee:/usr/local/cvs
19 %define         _cvsmodule      dokuwiki/plugin/poldek
20
21 %description
22 Plugin to display package NVR from repository.
23
24 {{poldek>PKGNAME}} is the syntax.
25
26 %prep
27 # check early if build is ok to be performed
28 %if %{!?debug:1}%{?debug:0} && %{!?_cvstag:1}%{?_cvstag:0} && %([[ %{release} = *.* ]] && echo 0 || echo 1)
29 # break if spec is not commited
30 cd %{_specdir}
31 if [ "$(cvs status %{name}.spec | awk '/Status:/{print $NF}')" != "Up-to-date" ]; then
32         : "Integer build not allowed: %{name}.spec is not up-to-date with CVS"
33         exit 1
34 fi
35 cd -
36 %endif
37 %setup -qTc
38 cd ..
39 cvs -d %{_cvsroot} co %{?_cvstag:-r %{_cvstag}} -d %{name}-%{version} -P %{_cvsmodule}
40 cd -
41
42 %build
43 # skip tagging if we checkouted from tag or have debug enabled
44 # also make make tag only if we have integer release
45 %if %{!?debug:1}%{?debug:0} && %{!?_cvstag:1}%{?_cvstag:0} && %([[ %{release} = *.* ]] && echo 0 || echo 1)
46 # do tagging by version
47 tag=%{name}-%(echo %{version} | tr . _)-%(echo %{release} | tr . _)
48
49 cd %{_specdir}
50 if [ $(cvs status -v %{name}.spec | grep -Ec "$tag[[:space:]]") != 0 ]; then
51         : "Tag $tag already exists"
52         exit 1
53 fi
54 cvs tag $tag %{name}.spec
55 cd -
56 cvs tag $tag
57 %endif
58
59 %install
60 rm -rf $RPM_BUILD_ROOT
61 install -d $RPM_BUILD_ROOT%{plugindir}
62 cp -a . $RPM_BUILD_ROOT%{plugindir}
63 find $RPM_BUILD_ROOT%{plugindir} -name CVS | xargs -r rm -rf
64
65 %clean
66 rm -rf $RPM_BUILD_ROOT
67
68 %files
69 %defattr(644,root,root,755)
70 %dir %{plugindir}
71 %{plugindir}/*.php
This page took 0.069262 seconds and 3 git commands to generate.