1 %define subver 2017-06-25
2 %define ver %(echo %{subver} | tr -d -)
3 %define plugin orphanswanted
4 %define php_min_version 5.3.0
5 %include /usr/lib/rpm/macros.php
6 Summary: DokuWiki plugin to find orphan pages, Wanted pages with reference counts
7 Name: dokuwiki-plugin-%{plugin}
11 Group: Applications/WWW
12 Source0: https://github.com/lupo49/dokuwiki-plugin-orphanswanted/archive/163625f/%{plugin}-%{subver}.tar.gz
13 # Source0-md5: b14fbb365e9b9e0dfcde770e7b50a0d3
14 URL: https://www.dokuwiki.org/plugin:orphanswanted
15 BuildRequires: rpm-php-pearprov >= 4.4.2-11
16 BuildRequires: rpmbuild(macros) >= 1.553
17 Requires: dokuwiki >= 20131208
18 Requires: php(core) >= %{php_min_version}
20 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
22 %define dokuconf /etc/webapps/dokuwiki
23 %define dokudir /usr/share/dokuwiki
24 %define plugindir %{dokudir}/lib/plugins/%{plugin}
25 %define find_lang %{_usrlibrpm}/dokuwiki-find-lang.sh %{buildroot}
28 Use this plugin to find orphan pages and wanted pages.
30 OrphansWanted show which pages are:
31 - Orphans (the page exists, but it has no links to it)
32 - Wanted (the page does not exist, but there are link(s) to it
33 elsewhere on the site)
34 - Valid (the page exists, and it can be reached through a link)
36 Each table shows the reference count and a link to backlinks.
43 version=$(awk '/^date/{print $2}' plugin.info.txt)
44 if [ "$(echo "$version" | tr -d -)" != %{version} ]; then
45 : %%{version} mismatch
50 rm -rf $RPM_BUILD_ROOT
51 install -d $RPM_BUILD_ROOT%{plugindir}
52 cp -a . $RPM_BUILD_ROOT%{plugindir}
53 rm $RPM_BUILD_ROOT%{plugindir}/{COPYING,README}
55 %find_lang %{name}.lang
58 rm -rf $RPM_BUILD_ROOT
60 %files -f %{name}.lang
61 %defattr(644,root,root,755)