]>
Commit | Line | Data |
---|---|---|
eb4fef70 ER |
1 | %define plugin redirect |
2 | %define php_min_version 5.0.0 | |
3 | %include /usr/lib/rpm/macros.php | |
4 | Summary: DokuWiki redirect plugin | |
5 | Name: dokuwiki-plugin-%{plugin} | |
6 | Version: 20100613 | |
4767e914 | 7 | Release: 6 |
eb4fef70 ER |
8 | License: GPL v2 |
9 | Group: Applications/WWW | |
10 | Source0: http://github.com/splitbrain/dokuwiki-plugin-%{plugin}/tarball/master#/%{plugin}-%{version}.tgz | |
11 | # Source0-md5: 8d5d6191b14ef16bc75975d1f206fa72 | |
553cd76a | 12 | Patch0: confdir.patch |
eb4fef70 ER |
13 | URL: http://www.dokuwiki.org/plugin:redirect |
14 | BuildRequires: rpm-php-pearprov >= 4.4.2-11 | |
15 | BuildRequires: rpmbuild(macros) >= 1.520 | |
16 | Requires: dokuwiki >= 20091225 | |
4767e914 | 17 | Requires: php(core) >= %{php_min_version} |
5f70b2b6 | 18 | Requires: php(pcre) |
eb4fef70 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 | %description | |
28 | Redirects page accesses to other pages or external sites using a | |
29 | central configuration file. | |
30 | ||
31 | %prep | |
32 | %setup -qc | |
33 | mv *-%{plugin}-*/* . | |
553cd76a | 34 | %patch0 -p1 |
eb4fef70 ER |
35 | |
36 | version=$(awk '/^date/{print $2}' plugin.info.txt) | |
37 | if [ "$(echo "$version" | tr -d -)" != %{version} ]; then | |
38 | : %%{version} mismatch | |
39 | exit 1 | |
40 | fi | |
41 | ||
42 | %install | |
43 | rm -rf $RPM_BUILD_ROOT | |
44 | install -d $RPM_BUILD_ROOT%{plugindir} | |
45 | cp -a . $RPM_BUILD_ROOT%{plugindir} | |
46 | %{__rm} $RPM_BUILD_ROOT%{plugindir}/README | |
47 | ||
a18681b9 ER |
48 | install -d $RPM_BUILD_ROOT%{dokuconf} |
49 | touch $RPM_BUILD_ROOT%{dokuconf}/%{plugin}.conf | |
50 | ||
eb4fef70 ER |
51 | %find_lang %{name}.lang |
52 | ||
53 | %clean | |
54 | rm -rf $RPM_BUILD_ROOT | |
55 | ||
56 | %files -f %{name}.lang | |
57 | %defattr(644,root,root,755) | |
58 | %doc README | |
a18681b9 | 59 | %attr(660,root,http) %config(noreplace) %verify(not md5 mtime size) %{dokuconf}/%{plugin}.conf |
eb4fef70 ER |
60 | %dir %{plugindir} |
61 | %{plugindir}/*.php | |
62 | %{plugindir}/*.txt | |
63 | %{plugindir}/conf |