]>
Commit | Line | Data |
---|---|---|
8c1d3141 ER |
1 | %define subver 2015-07-24 |
2 | %define ver %(echo %{subver} | tr -d -) | |
68d6d6b9 | 3 | %define plugin meta |
8c1d3141 | 4 | %define php_min_version 5.3.0 |
68d6d6b9 ER |
5 | Summary: Dokuwiki Plugin to Set Metadata |
6 | Name: dokuwiki-plugin-%{plugin} | |
8c1d3141 | 7 | Version: %{ver} |
68d6d6b9 ER |
8 | Release: 1 |
9 | License: GPL v2 | |
10 | Group: Applications/WWW | |
8c1d3141 ER |
11 | Source0: https://github.com/dokufreaks/plugin-meta/archive/8752219/%{plugin}-%{subver}.tar.gz |
12 | # Source0-md5: c335f4ffd1ca022948955093a4d84dea | |
13 | URL: https://www.dokuwiki.org/plugin:meta | |
68d6d6b9 ER |
14 | BuildRequires: rpmbuild(macros) >= 1.520 |
15 | Requires: dokuwiki >= 20061106 | |
8c1d3141 | 16 | Requires: php(core) >= %{php_min_version} |
68d6d6b9 ER |
17 | BuildArch: noarch |
18 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
19 | ||
20 | %define dokuconf /etc/webapps/dokuwiki | |
21 | %define dokudir /usr/share/dokuwiki | |
22 | %define plugindir %{dokudir}/lib/plugins/%{plugin} | |
23 | %define find_lang %{_usrlibrpm}/dokuwiki-find-lang.sh %{buildroot} | |
24 | ||
25 | %description | |
26 | This plugin allows you to set metadata for a page. This is useful for | |
27 | overriding default DokuWiki metadata, for example if you want to | |
28 | display someone else than the user who pasted the text into the wiki | |
29 | as the author of a blog entry. | |
30 | ||
31 | %prep | |
32 | %setup -qc | |
8c1d3141 | 33 | mv *-%{plugin}-*/* . |
68d6d6b9 | 34 | |
8c1d3141 ER |
35 | # nothing to do with tests |
36 | %{__rm} -r _test | |
37 | ||
38 | %build | |
39 | version=$(awk '/^date/{print $2}' plugin.info.txt) | |
68d6d6b9 ER |
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 | %clean | |
51 | rm -rf $RPM_BUILD_ROOT | |
52 | ||
53 | %files | |
54 | %defattr(644,root,root,755) | |
55 | %dir %{plugindir} | |
56 | %{plugindir}/*.php | |
8c1d3141 | 57 | %{plugindir}/*.txt |