]> git.pld-linux.org Git - projects/template-specs.git/blob - dokuwiki-plugin.spec
- undos, js needs refresh as well
[projects/template-specs.git] / dokuwiki-plugin.spec
1 %define         plugin          PLUGIN_NAME
2 Summary:        DokuWiki PLUGIN_NAME plugin
3 Summary(pl.UTF-8):      Wtyczka PLUGIN_NAME dla DokuWiki
4 Name:           dokuwiki-plugin-%{plugin}
5 Version:        -
6 Release:        0.1
7 License:        GPL v2
8 Group:          Applications/WWW
9 Source0:        -
10 # Source0-md5:  -
11 URL:            http://www.dokuwiki.org/plugin:PLUGIN_NAME
12 BuildRequires:  rpmbuild(macros) >= 1.520
13 # for %%undos macro
14 BuildRequires:  rpmbuild(macros) >= 1.553
15 Requires:       dokuwiki >= 20061106
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 Plugin for DokuWiki.
26
27 %description -l pl.UTF-8
28 Wtyczka dla DokuWiki
29
30 %prep
31 %setup -qc
32 # for githug urls:
33 mv *-%{plugin}-*/* .
34 # for other zip files:
35 mv %{plugin}/* .
36
37 version=$(cat VERSION)
38 version=$(awk '/date/{print $2}' plugin.info.txt)
39 version=$(awk -F"'" '/date/{print $4}' syntax.php)
40 if [ "$(echo "$version" | tr -d -)" != %{version} ]; then
41         : %%{version} mismatch
42         exit 1
43 fi
44
45 %install
46 rm -rf $RPM_BUILD_ROOT
47 install -d $RPM_BUILD_ROOT%{plugindir}
48 cp -a . $RPM_BUILD_ROOT%{plugindir}
49 rm -f $RPM_BUILD_ROOT%{plugindir}/{CREDITS,changelog}
50 rm -f $RPM_BUILD_ROOT%{plugindir}/{COPYING,README,VERSION}
51
52 # find locales
53 %find_lang %{name}.lang
54
55 %clean
56 rm -rf $RPM_BUILD_ROOT
57
58 # use this post section if you package .css or .js files
59 %post
60 # force js/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 %doc README CREDITS changelog
68 %dir %{plugindir}
69 %{plugindir}/*.txt
70 %{plugindir}/*.php
71 %{plugindir}/*.css
72 %{plugindir}/conf
73 %{plugindir}/images
This page took 0.035551 seconds and 4 git commands to generate.