]>
Commit | Line | Data |
---|---|---|
8d32c58f ER |
1 | %define plugin doodle |
2 | %define php_min_version 5.0.0 | |
8d32c58f ER |
3 | Summary: DokuWiki doodle plugin: Easy scheduling |
4 | Name: dokuwiki-plugin-%{plugin} | |
5 | Version: 20110101 | |
9bc6831b | 6 | Release: 7 |
8d32c58f ER |
7 | License: GPL v2 |
8 | Group: Applications/WWW | |
9 | Source0: http://public.doogie.de/projects/dokuwiki/doodle-latest.tar.gz | |
10 | # Source0-md5: af99dac9cc7249d5130b420268f7c03e | |
11 | URL: http://www.dokuwiki.org/plugin:doodle2 | |
12 | BuildRequires: rpm-php-pearprov >= 4.4.2-11 | |
13 | BuildRequires: rpmbuild(macros) >= 1.520 | |
14 | BuildRequires: unzip | |
15 | Requires: dokuwiki >= 20061106 | |
c43b9d24 | 16 | Requires: php(core) >= %{php_min_version} |
9bc6831b | 17 | Requires: php(date) |
82700e40 | 18 | Requires: php(pcre) |
8d32c58f ER |
19 | BuildArch: noarch |
20 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
21 | ||
22 | %define dokuconf /etc/webapps/dokuwiki | |
23 | %define dokudir /usr/share/dokuwiki | |
24 | %define plugindir %{dokudir}/lib/plugins/%{plugin} | |
25 | %define find_lang %{_usrlibrpm}/dokuwiki-find-lang.sh %{buildroot} | |
26 | ||
27 | # no pear deps | |
28 | %define _noautopear pear | |
29 | %define _noautoreq %{?_noautophp} %{?_noautopear} | |
30 | ||
31 | %description | |
32 | With this plugin you can offer your visitors a poll, where each user | |
33 | can vote for one (or more) choices. This is a unification of the | |
34 | doodle, vote, and userpoll plugins. | |
35 | ||
36 | %prep | |
37 | %setup -qc | |
38 | mv %{plugin}/* . | |
39 | ||
40 | version=$(awk '/^date/{print $2}' plugin.info.txt) | |
41 | if [ "$(echo "$version" | tr -d -)" != %{version} ]; then | |
42 | : %%{version} mismatch | |
43 | exit 1 | |
44 | fi | |
45 | ||
46 | %install | |
47 | rm -rf $RPM_BUILD_ROOT | |
48 | install -d $RPM_BUILD_ROOT%{plugindir} | |
49 | cp -a . $RPM_BUILD_ROOT%{plugindir} | |
50 | %{__rm} $RPM_BUILD_ROOT%{plugindir}/VERSION | |
51 | ||
52 | %find_lang %{name}.lang | |
53 | ||
54 | %clean | |
55 | rm -rf $RPM_BUILD_ROOT | |
56 | ||
57 | # use this post section if you package .css or .js files | |
58 | %post | |
59 | # force js/css cache refresh | |
60 | if [ -f %{dokuconf}/local.php ]; then | |
61 | touch %{dokuconf}/local.php | |
62 | fi | |
63 | ||
64 | %files -f %{name}.lang | |
65 | %defattr(644,root,root,755) | |
66 | %dir %{plugindir} | |
67 | %{plugindir}/*.css | |
68 | %{plugindir}/*.js | |
69 | %{plugindir}/*.php | |
70 | %{plugindir}/*.txt |