]>
Commit | Line | Data |
---|---|---|
9094adae ER |
1 | %define plugin bureaucracy |
2 | %define php_min_version 5.0.0 | |
3 | %include /usr/lib/rpm/macros.php | |
4 | Summary: Easily create HTML forms and collect the data via email or use it to create pages | |
5 | Summary(pl.UTF-8): Wtyczka bureaucracy dla DokuWiki | |
6 | Name: dokuwiki-plugin-%{plugin} | |
7 | Version: 20110525 | |
8 | Release: 1 | |
9 | License: GPL v2 | |
10 | Group: Applications/WWW | |
11 | Source0: http://github.com/splitbrain/dokuwiki-plugin-%{plugin}/tarball/master#/%{plugin}.tgz | |
12 | # Source0-md5: 042ceae7e1aa8b12e3a93e568846f326 | |
13 | URL: http://www.dokuwiki.org/plugin:bureaucracy | |
14 | BuildRequires: rpm-php-pearprov >= 4.4.2-11 | |
15 | BuildRequires: rpmbuild(macros) >= 1.520 | |
16 | Requires: dokuwiki >= 20061106 | |
17 | Requires: php-common >= 4:%{php_min_version} | |
18 | BuildArch: noarch | |
19 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
20 | ||
21 | %define dokuconf /etc/webapps/dokuwiki | |
22 | %define dokudir /usr/share/dokuwiki | |
23 | %define plugindir %{dokudir}/lib/plugins/%{plugin} | |
24 | %define find_lang %{_usrlibrpm}/dokuwiki-find-lang.sh %{buildroot} | |
25 | ||
26 | %description | |
27 | The bureaucracy plugin allows you to create a HTML form right within | |
28 | DokuWiki. | |
29 | ||
30 | Input format validation is automatically handled by the plugin and | |
31 | requires no coding. User input can be emailed to a preconfigured | |
32 | address or used to create new pages using a template. | |
33 | ||
34 | %prep | |
35 | %setup -qc | |
36 | mv *-%{plugin}-*/* . | |
37 | ||
38 | version=$(awk '/^date/{print $2}' plugin.info.txt) | |
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 | %{__rm} $RPM_BUILD_ROOT%{plugindir}/README | |
49 | ||
50 | %find_lang %{name}.lang | |
51 | ||
52 | %clean | |
53 | rm -rf $RPM_BUILD_ROOT | |
54 | ||
55 | %post | |
56 | # force js/css cache refresh | |
57 | if [ -f %{dokuconf}/local.php ]; then | |
58 | touch %{dokuconf}/local.php | |
59 | fi | |
60 | ||
61 | %files -f %{name}.lang | |
62 | %defattr(644,root,root,755) | |
63 | %doc README | |
64 | %dir %{plugindir} | |
65 | %{plugindir}/*.css | |
66 | %{plugindir}/*.js | |
67 | %{plugindir}/*.php | |
68 | %{plugindir}/*.txt | |
69 | %{plugindir}/conf | |
70 | %{plugindir}/script | |
71 | %{plugindir}/actions | |
72 | %{plugindir}/fields |