]>
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 | |
7 | Release: 1 | |
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 | |
12 | URL: http://www.dokuwiki.org/plugin:redirect | |
13 | BuildRequires: rpm-php-pearprov >= 4.4.2-11 | |
14 | BuildRequires: rpmbuild(macros) >= 1.520 | |
15 | Requires: dokuwiki >= 20091225 | |
16 | Requires: php-common >= 4:%{php_min_version} | |
17 | Requires: php-pcre | |
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 | Redirects page accesses to other pages or external sites using a | |
28 | central configuration file. | |
29 | ||
30 | %prep | |
31 | %setup -qc | |
32 | mv *-%{plugin}-*/* . | |
33 | ||
34 | version=$(awk '/^date/{print $2}' plugin.info.txt) | |
35 | if [ "$(echo "$version" | tr -d -)" != %{version} ]; then | |
36 | : %%{version} mismatch | |
37 | exit 1 | |
38 | fi | |
39 | ||
40 | %install | |
41 | rm -rf $RPM_BUILD_ROOT | |
42 | install -d $RPM_BUILD_ROOT%{plugindir} | |
43 | cp -a . $RPM_BUILD_ROOT%{plugindir} | |
44 | %{__rm} $RPM_BUILD_ROOT%{plugindir}/README | |
45 | ||
a18681b9 ER |
46 | install -d $RPM_BUILD_ROOT%{dokuconf} |
47 | touch $RPM_BUILD_ROOT%{dokuconf}/%{plugin}.conf | |
48 | ||
eb4fef70 ER |
49 | %find_lang %{name}.lang |
50 | ||
51 | %clean | |
52 | rm -rf $RPM_BUILD_ROOT | |
53 | ||
54 | %files -f %{name}.lang | |
55 | %defattr(644,root,root,755) | |
56 | %doc README | |
a18681b9 | 57 | %attr(660,root,http) %config(noreplace) %verify(not md5 mtime size) %{dokuconf}/%{plugin}.conf |
eb4fef70 ER |
58 | %dir %{plugindir} |
59 | %{plugindir}/*.php | |
60 | %{plugindir}/*.txt | |
61 | %{plugindir}/conf |