]> git.pld-linux.org Git - packages/dokuwiki-plugin-tablecalc.git/blob - dokuwiki-plugin-tablecalc.spec
- drop obsolete and outdated manual inclusion of rpm macros
[packages/dokuwiki-plugin-tablecalc.git] / dokuwiki-plugin-tablecalc.spec
1 %define         subver  2017-02-09
2 %define         ver             %(echo %{subver} | tr -d -)
3 %define         plugin          tablecalc
4 %define         php_min_version 5.3.0
5 %include        /usr/lib/rpm/macros.php
6 Summary:        DokuWiki tablecalc plugin
7 Summary(pl.UTF-8):      Wtyczka tablecalc dla DokuWiki
8 Name:           dokuwiki-plugin-%{plugin}
9 Version:        %{ver}
10 Release:        1
11 License:        GPL v2
12 Group:          Applications/WWW
13 Source0:        https://narezka.org/cfd/msgdb/740/tablecalc.zip
14 # Source0-md5:  6a68227688486e83b8b7a9dd573f4a87
15 URL:            https://www.dokuwiki.org/plugin:tablecalc
16 BuildRequires:  rpmbuild(macros) >= 1.520
17 BuildRequires:  unzip
18 Requires:       dokuwiki >= 20131208
19 Requires:       php(core) >= %{php_min_version}
20 BuildArch:      noarch
21 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
22
23 %define         dokuconf        /etc/webapps/dokuwiki
24 %define         dokudir /usr/share/dokuwiki
25 %define         plugindir       %{dokudir}/lib/plugins/%{plugin}
26
27 %description
28 Adds ability to use Excel-style formulas in tables.
29
30 %prep
31 %setup -qc
32 mv %{plugin}/* .
33
34 find '(' -name '*~' -o -name '*.orig' ')' -print0 | xargs -0 -r -l512 rm -f
35
36 %build
37 # 13-04-10
38 version=$(awk -F"'" '/date/{split($4, a, "-"); printf("%04d-%02d-%02d\n", 2000 + a[3], a[2], a[1])}' syntax.php)
39 if [ "$(echo "$version" | tr -d -)" != %{version} ]; then
40         : %%{version} mismatch
41         exit 1
42 fi
43
44 %install
45 rm -rf $RPM_BUILD_ROOT
46 install -d $RPM_BUILD_ROOT%{plugindir}
47 cp -a . $RPM_BUILD_ROOT%{plugindir}
48
49 %clean
50 rm -rf $RPM_BUILD_ROOT
51
52 %post
53 # force css cache refresh
54 if [ -f %{dokuconf}/local.php ]; then
55         touch %{dokuconf}/local.php
56 fi
57
58 %files
59 %defattr(644,root,root,755)
60 %dir %{plugindir}
61 %{plugindir}/*.php
62 %{plugindir}/*.js
This page took 0.069958 seconds and 3 git commands to generate.