]>
Commit | Line | Data |
---|---|---|
e82cb093 ER |
1 | %define subver 2014-11-12 |
2 | %define ver %(echo %{subver} | tr -d -) | |
b2d8bea7 | 3 | %define plugin PLUGIN_NAME |
1cc62838 | 4 | %define php_min_version 5.3.0 |
b2d8bea7 SP |
5 | Summary: DokuWiki PLUGIN_NAME plugin |
6 | Summary(pl.UTF-8): Wtyczka PLUGIN_NAME dla DokuWiki | |
7 | Name: dokuwiki-plugin-%{plugin} | |
e82cb093 | 8 | Version: %{ver} |
b2d8bea7 SP |
9 | Release: 0.1 |
10 | License: GPL v2 | |
11 | Group: Applications/WWW | |
e82cb093 | 12 | Source0: https://github.com/-/%{plugin}/archive/%{subver}/%{plugin}-%{subver}.tar.gz |
78c74a76 | 13 | # Source0-md5: - |
e82cb093 | 14 | URL: https://www.dokuwiki.org/plugin:PLUGIN_NAME |
15f5410b | 15 | BuildRequires: rpm-php-pearprov >= 4.4.2-11 |
7c60ed50 | 16 | BuildRequires: rpmbuild(find_lang) >= 1.41 |
58b78444 | 17 | BuildRequires: rpmbuild(macros) >= 1.745 |
b2d8bea7 | 18 | Requires: dokuwiki >= 20061106 |
f5615cba ER |
19 | # See https://www.dokuwiki.org/changes for detailed changed features |
20 | # plugin with .less support (Binky) | |
21 | Requires: dokuwiki >= 20131208 | |
e82cb093 | 22 | Requires: php(core) >= %{php_min_version} |
b2d8bea7 SP |
23 | BuildArch: noarch |
24 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
25 | ||
49e13f00 | 26 | %define dokuconf /etc/webapps/dokuwiki |
1eb9b51e | 27 | %define dokudir /usr/share/dokuwiki |
df76dd27 | 28 | %define plugindir %{dokudir}/lib/plugins/%{plugin} |
b2d8bea7 | 29 | |
15f5410b ER |
30 | # no pear deps |
31 | %define _noautopear pear | |
32 | ||
33 | # exclude optional php dependencies | |
34 | %define _noautophp php-someext | |
35 | ||
36 | # put it together for rpmbuild | |
37 | %define _noautoreq %{?_noautophp} %{?_noautopear} | |
38 | ||
b2d8bea7 SP |
39 | %description |
40 | Plugin for DokuWiki. | |
41 | ||
42 | %description -l pl.UTF-8 | |
43 | Wtyczka dla DokuWiki | |
44 | ||
45 | %prep | |
287c4299 | 46 | %setup -qc |
80d95dc9 | 47 | # for github urls: |
81859592 | 48 | mv *-%{plugin}-*/{.??*,*} . |
e82cb093 ER |
49 | # for github tags: |
50 | %setup -q -n %{plugin}-%{subver} | |
81859592 ER |
51 | |
52 | # nothing to do with tests | |
53 | %{__rm} -r _test | |
54 | %{__rm} .travis.yml | |
287c4299 | 55 | |
e82cb093 | 56 | %build |
8e79ff6a | 57 | version=$(awk '/^date/{print $2}' plugin.info.txt) |
ba215711 | 58 | if [ "$(echo "$version" | tr -d -)" != %{version} ]; then |
6897586a | 59 | : %%{version} mismatch |
1cf391c3 ER |
60 | exit 1 |
61 | fi | |
b2d8bea7 SP |
62 | |
63 | %install | |
64 | rm -rf $RPM_BUILD_ROOT | |
df76dd27 ER |
65 | install -d $RPM_BUILD_ROOT%{plugindir} |
66 | cp -a . $RPM_BUILD_ROOT%{plugindir} | |
f945f4ae | 67 | %{__rm} $RPM_BUILD_ROOT%{plugindir}/README |
895f216a | 68 | %{__rm} $RPM_BUILD_ROOT%{plugindir}/{LICENSE,README} |
80d95dc9 | 69 | %{__rm} $RPM_BUILD_ROOT%{plugindir}/{COPYING,README} |
827c2038 ER |
70 | %{__rm} $RPM_BUILD_ROOT%{plugindir}/{CREDITS,changelog} |
71 | %{__rm} $RPM_BUILD_ROOT%{plugindir}/{COPYING,README,VERSION} | |
366ae604 | 72 | %{__rm} -r $RPM_BUILD_ROOT%{plugindir}/_test |
b2d8bea7 | 73 | |
7c60ed50 | 74 | %find_lang %{name}.lang --with-dokuwiki |
78c74a76 | 75 | |
b2d8bea7 SP |
76 | %clean |
77 | rm -rf $RPM_BUILD_ROOT | |
78 | ||
4d6b11bb | 79 | # use this post section if you package .css or .js files |
49e13f00 | 80 | %post |
4d6b11bb | 81 | # force js/css cache refresh |
49e13f00 ER |
82 | if [ -f %{dokuconf}/local.php ]; then |
83 | touch %{dokuconf}/local.php | |
84 | fi | |
85 | ||
78c74a76 | 86 | %files -f %{name}.lang |
b2d8bea7 SP |
87 | %defattr(644,root,root,755) |
88 | %doc README CREDITS changelog | |
df76dd27 | 89 | %dir %{plugindir} |
df76dd27 | 90 | %{plugindir}/*.css |
827c2038 | 91 | %{plugindir}/*.js |
366ae604 | 92 | %{plugindir}/*.less |
827c2038 ER |
93 | %{plugindir}/*.php |
94 | %{plugindir}/*.txt | |
df76dd27 ER |
95 | %{plugindir}/conf |
96 | %{plugindir}/images |