]>
Commit | Line | Data |
---|---|---|
36df52a4 ER |
1 | %define subver 2017-07-27 |
2 | %define ver %(echo %{subver} | tr -d -) | |
9094adae | 3 | %define plugin bureaucracy |
bb1cf2c8 | 4 | %define php_min_version 5.1.2 |
9094adae ER |
5 | %include /usr/lib/rpm/macros.php |
6 | Summary: Easily create HTML forms and collect the data via email or use it to create pages | |
7 | Summary(pl.UTF-8): Wtyczka bureaucracy dla DokuWiki | |
8 | Name: dokuwiki-plugin-%{plugin} | |
36df52a4 | 9 | Version: %{ver} |
09ab7d8f | 10 | Release: 1 |
9094adae ER |
11 | License: GPL v2 |
12 | Group: Applications/WWW | |
36df52a4 ER |
13 | Source0: https://github.com/splitbrain/dokuwiki-plugin-%{plugin}/archive/%{subver}/%{plugin}-%{version}.tar.gz |
14 | # Source0-md5: 8eb3f12f2c2c622019cf503f9a0c0ff8 | |
09ab7d8f | 15 | URL: https://www.dokuwiki.org/plugin:bureaucracy |
9094adae ER |
16 | BuildRequires: rpm-php-pearprov >= 4.4.2-11 |
17 | BuildRequires: rpmbuild(macros) >= 1.520 | |
09ab7d8f | 18 | Requires: dokuwiki >= 20131208 |
83934ca4 | 19 | Requires: php(core) >= %{php_min_version} |
78539f1e ER |
20 | Requires: php(pcre) |
21 | Requires: php(spl) | |
9094adae ER |
22 | BuildArch: noarch |
23 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
24 | ||
25 | %define dokuconf /etc/webapps/dokuwiki | |
26 | %define dokudir /usr/share/dokuwiki | |
27 | %define plugindir %{dokudir}/lib/plugins/%{plugin} | |
28 | %define find_lang %{_usrlibrpm}/dokuwiki-find-lang.sh %{buildroot} | |
29 | ||
30 | %description | |
31 | The bureaucracy plugin allows you to create a HTML form right within | |
32 | DokuWiki. | |
33 | ||
34 | Input format validation is automatically handled by the plugin and | |
35 | requires no coding. User input can be emailed to a preconfigured | |
36 | address or used to create new pages using a template. | |
37 | ||
38 | %prep | |
39 | %setup -qc | |
40 | mv *-%{plugin}-*/* . | |
09ab7d8f ER |
41 | rm -r *-%{plugin}-* |
42 | rm -r _test | |
9094adae | 43 | |
09ab7d8f | 44 | %build |
9094adae ER |
45 | version=$(awk '/^date/{print $2}' plugin.info.txt) |
46 | if [ "$(echo "$version" | tr -d -)" != %{version} ]; then | |
47 | : %%{version} mismatch | |
48 | exit 1 | |
49 | fi | |
50 | ||
51 | %install | |
52 | rm -rf $RPM_BUILD_ROOT | |
53 | install -d $RPM_BUILD_ROOT%{plugindir} | |
54 | cp -a . $RPM_BUILD_ROOT%{plugindir} | |
55 | %{__rm} $RPM_BUILD_ROOT%{plugindir}/README | |
56 | ||
57 | %find_lang %{name}.lang | |
58 | ||
59 | %clean | |
60 | rm -rf $RPM_BUILD_ROOT | |
61 | ||
62 | %post | |
63 | # force js/css cache refresh | |
64 | if [ -f %{dokuconf}/local.php ]; then | |
65 | touch %{dokuconf}/local.php | |
66 | fi | |
67 | ||
68 | %files -f %{name}.lang | |
69 | %defattr(644,root,root,755) | |
70 | %doc README | |
71 | %dir %{plugindir} | |
72 | %{plugindir}/*.css | |
73 | %{plugindir}/*.js | |
74 | %{plugindir}/*.php | |
75 | %{plugindir}/*.txt | |
76 | %{plugindir}/conf | |
09ab7d8f | 77 | %{plugindir}/helper |
36df52a4 ER |
78 | %{plugindir}/interfaces |
79 | %{plugindir}/script |