]>
Commit | Line | Data |
---|---|---|
fa366108 ER |
1 | %define subver 2016-11-03 |
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 | |
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 | |
a0d91e56 | 16 | BuildRequires: rpmbuild(find_lang) >= 1.41 |
fa366108 ER |
17 | BuildRequires: rpmbuild(macros) >= 1.553 |
18 | Requires: dokuwiki >= 20160626 | |
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 | |
51 | ||
52 | %build | |
53 | version=$(awk '/^date/{print $2}' plugin.info.txt) | |
54 | if [ "$(echo "$version" | tr -d -)" != %{version} ]; then | |
55 | : %%{version} mismatch | |
56 | exit 1 | |
57 | fi | |
58 | ||
59 | %install | |
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 | |
65 | ||
a0d91e56 | 66 | %find_lang %{name}.lang --with-dokuwiki |
fa366108 ER |
67 | |
68 | %clean | |
69 | rm -rf $RPM_BUILD_ROOT | |
70 | ||
71 | %post | |
72 | # force js/css cache refresh | |
73 | if [ -f %{dokuconf}/local.php ]; then | |
74 | touch %{dokuconf}/local.php | |
75 | fi | |
76 | ||
77 | %files -f %{name}.lang | |
78 | %defattr(644,root,root,755) | |
79 | %doc README LICENSE | |
80 | %dir %{plugindir} | |
81 | %{plugindir}/*.js | |
82 | %{plugindir}/*.less | |
83 | %{plugindir}/*.php | |
84 | %{plugindir}/*.txt | |
85 | %{plugindir}/action | |
86 | %{plugindir}/admin | |
87 | %{plugindir}/conf | |
88 | %{plugindir}/db | |
89 | %{plugindir}/helper | |
90 | %{plugindir}/jsoneditor | |
91 | %{plugindir}/meta | |
92 | %{plugindir}/renderer | |
93 | %{plugindir}/script | |
94 | %{plugindir}/syntax | |
95 | %{plugindir}/types |