]>
Commit | Line | Data |
---|---|---|
02c3feec ER |
1 | %define plugin icalevents |
2 | %define php_min_version 5.0.0 | |
3 | %include /usr/lib/rpm/macros.php | |
4 | Summary: Parses an iCal calendar .ics file and renders it as an HTML table | |
5 | Name: dokuwiki-plugin-%{plugin} | |
6 | Version: 20100501 | |
7 | Release: 0.4 | |
8 | License: GPL v2 | |
9 | Group: Applications/WWW | |
10 | Source0: http://public.doogie.de/projects/dokuwiki/plugin_iCalEvents_2.0.zip | |
11 | # Source0-md5: abef6798132ba03b74afd72ea62678ca | |
12 | URL: http://www.dokuwiki.org/plugin:icalevents | |
13 | BuildRequires: rpm-php-pearprov >= 4.4.2-11 | |
14 | Patch0: dformat.patch | |
15 | BuildRequires: rpmbuild(macros) >= 1.553 | |
16 | Requires: dokuwiki >= 20080505 | |
17 | Requires: php-common >= 4:%{php_min_version} | |
18 | Requires: php-date | |
19 | Requires: php-pcre | |
20 | BuildArch: noarch | |
21 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
22 | ||
23 | %define dokuconf /etc/webapps/dokuwiki | |
24 | %define dokudir /usr/share/dokuwiki | |
25 | %define plugindir %{dokudir}/lib/plugins/%{plugin} | |
26 | %define find_lang %{_usrlibrpm}/dokuwiki-find-lang.sh %{buildroot} | |
27 | ||
28 | %description | |
29 | Many calendars can export their entries in the iCalendar (RFC 2445) | |
30 | format. This plugin can read such an *.ics file from an URL, parse it | |
31 | and display upcoming events as an HTML table. | |
32 | ||
33 | %prep | |
34 | %setup -qc | |
35 | mv iCalEvents/* . | |
36 | %undos -f php | |
37 | %patch0 -p1 | |
38 | ||
39 | version=$(awk -F"'" '/date/&&/=>/{print $4}' syntax.php) | |
40 | if [ "$(echo "$version" | tr -d -)" != %{version} ]; then | |
41 | : %%{version} mismatch | |
42 | # exit 1 | |
43 | fi | |
44 | ||
45 | %install | |
46 | rm -rf $RPM_BUILD_ROOT | |
47 | install -d $RPM_BUILD_ROOT%{plugindir} | |
48 | cp -a . $RPM_BUILD_ROOT%{plugindir} | |
49 | ||
50 | %find_lang %{name}.lang | |
51 | ||
52 | %clean | |
53 | rm -rf $RPM_BUILD_ROOT | |
54 | ||
55 | %files -f %{name}.lang | |
56 | %defattr(644,root,root,755) | |
57 | %dir %{plugindir} | |
58 | %{plugindir}/*.php | |
59 | %{plugindir}/conf |