1 %define subver 2023-03-14
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/%{subver}/%{plugin}-%{subver}.tar.gz
13 # Source0-md5: b79aa8017906680ad0330c1135501853
14 URL: https://www.dokuwiki.org/plugin:struct
15 BuildRequires: rpm-php-pearprov >= 4.4.2-11
16 BuildRequires: rpmbuild(find_lang) >= 1.41
17 BuildRequires: rpmbuild(macros) >= 1.553
18 Requires: dokuwiki >= 20160626
19 Requires: dokuwiki-plugin-sqlite >= 20160810
20 Requires: php(core) >= %{php_min_version}
22 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
24 %define dokuconf /etc/webapps/dokuwiki
25 %define dokudir /usr/share/dokuwiki
26 %define plugindir %{dokudir}/lib/plugins/%{plugin}
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}-*/{.??*,*} .
54 version=$(awk '/^date/{print $2}' plugin.info.txt)
55 if [ "$(echo "$version" | tr -d -)" != %{version} ]; then
56 : %%{version} mismatch
61 rm -rf $RPM_BUILD_ROOT
62 install -d $RPM_BUILD_ROOT%{plugindir}
63 cp -a . $RPM_BUILD_ROOT%{plugindir}
64 %{__rm} $RPM_BUILD_ROOT%{plugindir}/{LICENSE,README}
65 %{__rm} -r $RPM_BUILD_ROOT%{plugindir}/_test
67 %find_lang %{name}.lang --with-dokuwiki
70 rm -rf $RPM_BUILD_ROOT
73 # force js/css cache refresh
74 if [ -f %{dokuconf}/local.php ]; then
75 touch %{dokuconf}/local.php
78 %files -f %{name}.lang
79 %defattr(644,root,root,755)
92 %{plugindir}/jsoneditor