]>
Commit | Line | Data |
---|---|---|
a894fa74 ER |
1 | %define subver 2016-04-26 |
2 | %define ver %(echo %{subver} | tr -d -) | |
54ecf79b | 3 | %define plugin blog |
a894fa74 | 4 | %define php_min_version 5.3.0 |
54ecf79b GP |
5 | Summary: DokuWiki Blog Plugin |
6 | Name: dokuwiki-plugin-%{plugin} | |
a894fa74 ER |
7 | Version: %{ver} |
8 | Release: 1 | |
54ecf79b GP |
9 | License: GPL v2 |
10 | Group: Applications/WWW | |
a894fa74 ER |
11 | # no real version, https://github.com/dokufreaks/plugin-blog/issues/90 |
12 | Source0: https://github.com/dokufreaks/plugin-blog/archive/5a8b272/%{plugin}-%{subver}.tar.gz | |
13 | # Source0-md5: 4237348a3a3a681e5a5fd877455c6a6f | |
14 | URL: https://www.dokuwiki.org/plugin:blog | |
931e070c | 15 | BuildRequires: rpmbuild(macros) >= 1.520 |
a894fa74 ER |
16 | Requires: dokuwiki >= 20131208 |
17 | Requires: php(core) >= %{php_min_version} | |
54ecf79b GP |
18 | Requires: dokuwiki-plugin-include |
19 | Requires: dokuwiki-plugin-pagelist | |
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} | |
931e070c | 26 | %define find_lang %{_usrlibrpm}/dokuwiki-find-lang.sh %{buildroot} |
54ecf79b GP |
27 | |
28 | %description | |
931e070c ER |
29 | The Blog Plugin makes blogs in your wiki easily possible. The blog |
30 | component shows the latest entries (pages) from a namespace in reverse | |
31 | chronological order. | |
54ecf79b GP |
32 | |
33 | %prep | |
931e070c | 34 | %setup -qc |
a894fa74 | 35 | mv plugin-%{plugin}-*/* . |
931e070c | 36 | |
a894fa74 ER |
37 | %build |
38 | version=$(awk '/^date/{print $2}' plugin.info.txt) | |
7fb89fa7 ER |
39 | if [ "$(echo "$version" | tr -d -)" != %{version} ]; then |
40 | : %%{version} mismatch | |
bc758c2e ER |
41 | exit 1 |
42 | fi | |
43 | ||
54ecf79b GP |
44 | %install |
45 | rm -rf $RPM_BUILD_ROOT | |
46 | install -d $RPM_BUILD_ROOT%{plugindir} | |
47 | cp -a . $RPM_BUILD_ROOT%{plugindir} | |
a894fa74 | 48 | rm $RPM_BUILD_ROOT%{plugindir}/{COPYING,README,_template.txt} |
54ecf79b GP |
49 | |
50 | # find locales | |
931e070c | 51 | %find_lang %{name}.lang |
54ecf79b GP |
52 | |
53 | %clean | |
54 | rm -rf $RPM_BUILD_ROOT | |
55 | ||
56 | %post | |
57 | # force css cache refresh | |
58 | if [ -f %{dokuconf}/local.php ]; then | |
59 | touch %{dokuconf}/local.php | |
60 | fi | |
61 | ||
62 | %files -f %{name}.lang | |
63 | %defattr(644,root,root,755) | |
62205506 | 64 | %doc README _template.txt |
54ecf79b | 65 | %dir %{plugindir} |
54ecf79b | 66 | %{plugindir}/*.css |
a894fa74 ER |
67 | %{plugindir}/*.php |
68 | %{plugindir}/*.txt | |
54ecf79b GP |
69 | %{plugindir}/conf |
70 | %{plugindir}/syntax |