]>
Commit | Line | Data |
---|---|---|
1 | %define plugin poldek | |
2 | %define php_min_version 5.3.0 | |
3 | Summary: DokuWiki poldek Plugin | |
4 | Summary(pl.UTF-8): Wtyczka Include (dołączania) dla poldek | |
5 | Name: dokuwiki-plugin-%{plugin} | |
6 | Version: 20160818 | |
7 | Release: 1 | |
8 | License: GPL v2 | |
9 | Group: Applications/WWW | |
10 | Source0: https://github.com/glensc/dokuwiki-plugin-poldek/archive/%{version}/%{plugin}-%{version}.tar.gz | |
11 | # Source0-md5: 592cba069fc705121cced99b55d81548 | |
12 | URL: https://github.com/glensc/dokuwiki-plugin-poldek | |
13 | Requires: dokuwiki >= 20080505 | |
14 | Requires: php(core) >= %{php_min_version} | |
15 | Requires: poldek | |
16 | BuildArch: noarch | |
17 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
18 | ||
19 | %define dokudir /usr/share/dokuwiki | |
20 | %define plugindir %{dokudir}/lib/plugins/%{plugin} | |
21 | %define _sysconfdir /etc/webapps/dokuwiki | |
22 | %define find_lang %{_usrlibrpm}/dokuwiki-find-lang.sh %{buildroot} | |
23 | ||
24 | %description | |
25 | Plugin to display package NVR from repository. | |
26 | ||
27 | {{poldek>PKGNAME}} is the syntax. | |
28 | ||
29 | %prep | |
30 | %setup -q | |
31 | ||
32 | %build | |
33 | version=$(awk '/date/{print $2}' plugin.info.txt) | |
34 | if [ "$(echo "$version" | tr -d -)" != %{version} ]; then | |
35 | : %%{version} mismatch | |
36 | exit 1 | |
37 | fi | |
38 | ||
39 | %install | |
40 | rm -rf $RPM_BUILD_ROOT | |
41 | install -d $RPM_BUILD_ROOT{%{plugindir},%{_sysconfdir}} | |
42 | cp -a . $RPM_BUILD_ROOT%{plugindir} | |
43 | mv $RPM_BUILD_ROOT{%{plugindir},%{_sysconfdir}}/poldek.conf | |
44 | ||
45 | %find_lang %{name}.lang | |
46 | ||
47 | %clean | |
48 | rm -rf $RPM_BUILD_ROOT | |
49 | ||
50 | %files -f %{name}.lang | |
51 | %defattr(644,root,root,755) | |
52 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/poldek.conf | |
53 | %dir %{plugindir} | |
54 | %{plugindir}/*.php | |
55 | %{plugindir}/*.txt | |
56 | %{plugindir}/conf |