1 %define subver 2018-11-29
2 %define ver %(echo %{subver} | tr -d -)
4 %define php_min_version 5.3.0
5 Summary: DokuWiki Include Plugin
6 Summary(pl.UTF-8): Wtyczka Include (dołączania) dla DokuWiki
7 Name: dokuwiki-plugin-%{plugin}
11 Group: Applications/WWW
12 Source0: https://github.com/dokufreaks/plugin-include/archive/%{subver}/%{plugin}-%{subver}.tar.gz
13 # Source0-md5: 91ba150278c8c6680c08af87cb8a1657
14 URL: https://www.dokuwiki.org/plugin:include
15 BuildRequires: rpmbuild(macros) >= 1.520
16 Requires: dokuwiki >= 20080505
18 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
20 %define dokuconf /etc/webapps/dokuwiki
21 %define dokudir /usr/share/dokuwiki
22 %define dokudata /var/lib/dokuwiki
23 %define plugindir %{dokudir}/lib/plugins/%{plugin}
24 %define find_lang %{_usrlibrpm}/dokuwiki-find-lang.sh %{buildroot}
27 This is a very simple yet handy plugin with which you can include
28 another wiki page into the current one.
30 %description -l pl.UTF-8
31 To jest bardzo prosta, ale pomocna wtyczka, przy pomocy której można
32 dołączyć inną stronę wiki do bieżącej.
36 mv *-%{plugin}-*/{.??*,*} .
38 # nothing to do with tests
43 version=$(awk '/date/{print $2}' plugin.info.txt)
44 if [ $(echo "$version" | tr -d -) != %{version} ]; then
45 : %%{version} mismatch
50 rm -rf $RPM_BUILD_ROOT
51 install -d $RPM_BUILD_ROOT%{plugindir}
52 cp -a . $RPM_BUILD_ROOT%{plugindir}
53 %{__rm} $RPM_BUILD_ROOT%{plugindir}/{COPYING,README}
56 %find_lang %{name}.lang
59 rm -rf $RPM_BUILD_ROOT
62 # force js cache refresh
63 if [ -f %{dokuconf}/local.php ]; then
64 touch %{dokuconf}/local.php
67 %triggerpostun -- %{name} < 20110821
68 # http://www.dokuwiki.org/plugin:include says:
69 # It is recommended to delete all cache files in <dokuwiki>/data/cache directly
70 # after upgrading the plugin from an old version (before 2011)
71 # seems doku cache is one letter hex subdirs. nuke those
72 rm -rf %{dokudata}/cache/?
74 %files -f %{name}.lang
75 %defattr(644,root,root,755)