]>
Commit | Line | Data |
---|---|---|
7a24e83b | 1 | %define subver 2023-03-14 |
fa366108 ER |
2 | %define ver %(echo %{subver} | tr -d -) |
3 | %define plugin struct | |
4 | %define php_min_version 5.6.0 | |
fa366108 ER |
5 | Summary: DokuWiki struct plugin |
6 | Summary(pl.UTF-8): Wtyczka struct dla DokuWiki | |
7 | Name: dokuwiki-plugin-%{plugin} | |
8 | Version: %{ver} | |
9 | Release: 1 | |
10 | License: GPL v2 | |
11 | Group: Applications/WWW | |
7a24e83b ER |
12 | Source0: https://github.com/cosmocode/dokuwiki-plugin-struct/archive/%{subver}/%{plugin}-%{subver}.tar.gz |
13 | # Source0-md5: b79aa8017906680ad0330c1135501853 | |
fa366108 ER |
14 | URL: https://www.dokuwiki.org/plugin:struct |
15 | BuildRequires: rpm-php-pearprov >= 4.4.2-11 | |
a0d91e56 | 16 | BuildRequires: rpmbuild(find_lang) >= 1.41 |
fa366108 | 17 | BuildRequires: rpmbuild(macros) >= 1.553 |
eeaf3e1f | 18 | Requires: dokuwiki >= 20180422 |
c431ca9d | 19 | Requires: dokuwiki-plugin-sqlite >= 20160810 |
fa366108 ER |
20 | Requires: php(core) >= %{php_min_version} |
21 | BuildArch: noarch | |
22 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
23 | ||
24 | %define dokuconf /etc/webapps/dokuwiki | |
25 | %define dokudir /usr/share/dokuwiki | |
26 | %define plugindir %{dokudir}/lib/plugins/%{plugin} | |
fa366108 ER |
27 | |
28 | %description | |
29 | A new structured data plugin. | |
30 | ||
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. | |
34 | ||
35 | So why another plugin? The data plugin proved to be very useful and | |
36 | versatile but had a few shortcomings: | |
37 | ||
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 | |
42 | pages | |
43 | - there was no validation for the data entered | |
44 | ||
45 | %prep | |
46 | %setup -qc | |
47 | mv *-%{plugin}-*/{.??*,*} . | |
48 | ||
49 | rm deleted.files | |
50 | rm .travis.yml | |
7a24e83b | 51 | rm -r .github |
fa366108 ER |
52 | |
53 | %build | |
54 | version=$(awk '/^date/{print $2}' plugin.info.txt) | |
55 | if [ "$(echo "$version" | tr -d -)" != %{version} ]; then | |
56 | : %%{version} mismatch | |
57 | exit 1 | |
58 | fi | |
59 | ||
60 | %install | |
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 | |
66 | ||
a0d91e56 | 67 | %find_lang %{name}.lang --with-dokuwiki |
fa366108 ER |
68 | |
69 | %clean | |
70 | rm -rf $RPM_BUILD_ROOT | |
71 | ||
72 | %post | |
73 | # force js/css cache refresh | |
74 | if [ -f %{dokuconf}/local.php ]; then | |
75 | touch %{dokuconf}/local.php | |
76 | fi | |
77 | ||
78 | %files -f %{name}.lang | |
79 | %defattr(644,root,root,755) | |
80 | %doc README LICENSE | |
81 | %dir %{plugindir} | |
82 | %{plugindir}/*.js | |
83 | %{plugindir}/*.less | |
84 | %{plugindir}/*.php | |
7a24e83b | 85 | %{plugindir}/*.svg |
fa366108 ER |
86 | %{plugindir}/*.txt |
87 | %{plugindir}/action | |
88 | %{plugindir}/admin | |
89 | %{plugindir}/conf | |
90 | %{plugindir}/db | |
91 | %{plugindir}/helper | |
92 | %{plugindir}/jsoneditor | |
93 | %{plugindir}/meta | |
94 | %{plugindir}/renderer | |
95 | %{plugindir}/script | |
96 | %{plugindir}/syntax | |
97 | %{plugindir}/types |