1 %define subver 2016-11-03
2 %define ver %(echo %{subver} | tr -d -)
4 %define php_min_version 5.6.0
5 Summary: DokuWiki struct plugin
6 Summary(pl.UTF-8): Wtyczka struct dla DokuWiki
7 Name: dokuwiki-plugin-%{plugin}
11 Group: Applications/WWW
12 Source0: https://github.com/cosmocode/dokuwiki-plugin-struct/archive/9ce9c74/%{plugin}-%{subver}.tar.gz
13 # Source0-md5: 7d6f2807334aa61515c22c430eee4749
14 URL: https://www.dokuwiki.org/plugin:struct
15 BuildRequires: rpm-php-pearprov >= 4.4.2-11
16 BuildRequires: rpmbuild(macros) >= 1.553
17 Requires: dokuwiki >= 20160626
18 Requires: dokuwiki-plugin-sqlite >= 20160810
19 Requires: php(core) >= %{php_min_version}
21 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
23 %define dokuconf /etc/webapps/dokuwiki
24 %define dokudir /usr/share/dokuwiki
25 %define plugindir %{dokudir}/lib/plugins/%{plugin}
26 %define find_lang %{_usrlibrpm}/dokuwiki-find-lang.sh %{buildroot}
29 A new structured data plugin.
31 This plugin draws heavy inspiration from the data plugin. It basically
32 tries to solve the same problem of assigning structured data to pages
33 and build automatic aggregations from it.
35 So why another plugin? The data plugin proved to be very useful and
36 versatile but had a few shortcomings:
38 - each page defined its own set of structured data
39 - there was no central way to ensure the structured data was
40 consistent over multiple pages
41 - there was no easy way to modify the structured data set for multiple
43 - there was no validation for the data entered
47 mv *-%{plugin}-*/{.??*,*} .
53 version=$(awk '/^date/{print $2}' plugin.info.txt)
54 if [ "$(echo "$version" | tr -d -)" != %{version} ]; then
55 : %%{version} mismatch
60 rm -rf $RPM_BUILD_ROOT
61 install -d $RPM_BUILD_ROOT%{plugindir}
62 cp -a . $RPM_BUILD_ROOT%{plugindir}
63 %{__rm} $RPM_BUILD_ROOT%{plugindir}/{LICENSE,README}
64 %{__rm} -r $RPM_BUILD_ROOT%{plugindir}/_test
66 %find_lang %{name}.lang
69 rm -rf $RPM_BUILD_ROOT
72 # force js/css cache refresh
73 if [ -f %{dokuconf}/local.php ]; then
74 touch %{dokuconf}/local.php
77 %files -f %{name}.lang
78 %defattr(644,root,root,755)
90 %{plugindir}/jsoneditor