]> git.pld-linux.org Git - packages/dokuwiki-plugin-data.git/blame - dokuwiki-plugin-data.spec
Re-order LEFT JOIN pages before LEFT JOIN rpm
[packages/dokuwiki-plugin-data.git] / dokuwiki-plugin-data.spec
CommitLineData
ec9c36c5 1%define subver 2022-07-27
3c32c275 2%define ver %(echo %{subver} | tr -d -)
d045a0a5 3%define plugin data
93a728bd 4%define php_min_version 5.6.0
d045a0a5
ER
5Summary: DokuWiki Structured Data Plugin
6Name: dokuwiki-plugin-%{plugin}
3c32c275 7Version: %{ver}
dc560557 8Release: 2
d045a0a5
ER
9License: GPL v2
10Group: Applications/WWW
2225cb3b 11Source0: https://github.com/splitbrain/dokuwiki-plugin-%{plugin}/archive/%{subver}/%{plugin}-%{subver}.tar.gz
ec9c36c5 12# Source0-md5: 2a03d1428b83dd279132b8d5772e6e9d
3c32c275 13URL: https://www.dokuwiki.org/plugin:data
58e46b85 14Patch2: separator-style.patch
ce3f39eb 15Patch3: separate-rpmdb.patch
147d6c0c 16Patch4: cache-enable.patch
dca91af3 17BuildRequires: rpm-php-pearprov
76fb7000 18BuildRequires: rpmbuild(find_lang) >= 1.41
d045a0a5 19BuildRequires: rpmbuild(macros) >= 1.520
87d1921d 20Requires: dokuwiki >= 20090214b-5
49046ef8 21Requires: dokuwiki-plugin-sqlite >= 20130508
76fb7000 22Requires: php(core) >= %{php_min_version}
f4bb0314 23Requires: php(pcre)
d045a0a5
ER
24BuildArch: noarch
25BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
26
27%define dokuconf /etc/webapps/dokuwiki
69e06802 28%define dokudir /usr/share/dokuwiki
860b9ced 29%define metadir /var/lib/dokuwiki/meta
d045a0a5 30%define plugindir %{dokudir}/lib/plugins/%{plugin}
d045a0a5 31
4f0d4331
ER
32# no pear deps
33%define _noautopear pear
34
35# sqlite is dokuwiki-plugin-sqlite dep, not ours
36%define _noautophp php-sqlite
37
38# put it together for rpmbuild
39%define _noautoreq %{?_noautophp} %{?_noautopear}
40
d045a0a5
ER
41%description
42This plugin allows you to add structured data to any DokuWiki page.
43Think about this data as additional named attributes. Those attributes
44can then be queried and aggregated. The plugin is similar to what was
45done here for the repository plugin but its internals are very
46different to the repository plugin.
47
48%prep
860b9ced 49%setup -qc
90ea78de 50mv *-%{plugin}-*/{.??*,*} .
58e46b85 51%patch2 -p1
ce3f39eb 52%patch3 -p1
a4d4cd54 53%patch4 -p1
4978bd8e 54
1d83f60d
ER
55# nothing to do with tests
56rm -rf _test
90ea78de 57rm .travis.yml
1d83f60d 58
ab0be40f
ER
59# cleanup backups after patching
60find '(' -name '*~' -o -name '*.orig' ')' -print0 | xargs -0 -r -l512 rm -f
61
a4d4cd54
ER
62%build
63version=$(awk '/date/{print $2}' plugin.info.txt)
64if [ $(echo "$version" | tr -d -) != %{version} ]; then
65 : %%{version} mismatch
66 exit 1
67fi
68
d045a0a5
ER
69%install
70rm -rf $RPM_BUILD_ROOT
860b9ced 71install -d $RPM_BUILD_ROOT{%{plugindir},%{metadir}}
d045a0a5 72cp -a . $RPM_BUILD_ROOT%{plugindir}
58185fea 73%{__rm} $RPM_BUILD_ROOT%{plugindir}/README
0b4d4d8b 74# sqlite2: php-sqlite
860b9ced 75touch $RPM_BUILD_ROOT%{metadir}/data.sqlite
0b4d4d8b
ER
76# sqlite3: php-pdo-sqlite
77touch $RPM_BUILD_ROOT%{metadir}/data.sqlite3
69e06802 78
d045a0a5 79# find locales
76fb7000 80%find_lang %{name}.lang --with-dokuwiki
d045a0a5
ER
81
82%clean
83rm -rf $RPM_BUILD_ROOT
84
85%post
86# force css cache refresh
87if [ -f %{dokuconf}/local.php ]; then
88 touch %{dokuconf}/local.php
89fi
90
91%files -f %{name}.lang
92%defattr(644,root,root,755)
58185fea 93%doc README
d045a0a5 94%dir %{plugindir}
93a728bd 95%{plugindir}/*.css
860b9ced 96%{plugindir}/*.js
d045a0a5 97%{plugindir}/*.php
93a728bd 98%{plugindir}/*.svg
ab0be40f 99%{plugindir}/*.txt
ec9c36c5 100%{plugindir}/Form
90ea78de
ER
101%{plugindir}/admin
102%{plugindir}/conf
103%{plugindir}/db
104%{plugindir}/helper
105%{plugindir}/syntax
860b9ced 106%attr(660,http,http) %ghost %{metadir}/data.sqlite
0b4d4d8b 107%attr(660,http,http) %ghost %{metadir}/data.sqlite3
This page took 0.303877 seconds and 4 git commands to generate.