1 %define subver 2022-01-23
2 %define ver %(echo %{subver} | tr -d -)
4 %define php_min_version 5.3.0
5 Summary: Move pages, media files and namespaces while maintaining the link structure
6 Name: dokuwiki-plugin-%{plugin}
10 Group: Applications/WWW
11 Source0: https://github.com/michitux/dokuwiki-plugin-move/archive/%{subver}/%{plugin}-%{subver}.tar.gz
12 # Source0-md5: b6ac00200df22eb9b76376ef240fb7b7
13 URL: https://www.dokuwiki.org/plugin:move
14 BuildRequires: rpm-php-pearprov >= 4.4.2-11
15 BuildRequires: rpmbuild(find_lang) >= 1.41
16 BuildRequires: rpmbuild(macros) >= 1.745
17 BuildRequires: sed >= 4.0
18 Requires: dokuwiki >= 20131208
19 Requires: php(core) >= %{php_min_version}
21 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
23 %define dokuconf /etc/webapps/dokuwiki
24 %define dokudir /usr/share/dokuwiki
25 %define plugindir %{dokudir}/lib/plugins/%{plugin}
28 This plugin allows to move pages and namespaces including media files
29 and automatically adjusts all links and media references that point to
30 these pages. Unlike the old pagemove plugin this plugin uses the
31 DokuWiki parser which allows it to correctly identify all links and
34 Parts of this plugin like some of the translated strings, some parts
35 of the structure of the code and parts of the user interface have been
36 taken from the old pagemove plugin by Gary Owen, Arno Puschmann and
39 Warning: This plugin does not update ACL rules. For example if you had
40 an ACL rule that read-protected a certain wiki page this rule won't
41 have any effect anymore after moving that page.
45 mv *-%{plugin}-*/{.??*,*} .
47 rm .github/workflows/phpTestLinux.yml
51 version=$(awk '/^date/{print $2}' plugin.info.txt)
52 if [ "$(echo "$version" | tr -d -)" != %{version} ]; then
53 : %%{version} mismatch
58 rm -rf $RPM_BUILD_ROOT
59 install -d $RPM_BUILD_ROOT%{plugindir}
60 cp -a . $RPM_BUILD_ROOT%{plugindir}
62 %{__rm} $RPM_BUILD_ROOT%{plugindir}/README
63 %{__rm} -r $RPM_BUILD_ROOT%{plugindir}/_test
65 %find_lang %{name}.lang --with-dokuwiki
68 rm -rf $RPM_BUILD_ROOT
70 %files -f %{name}.lang
71 %defattr(644,root,root,755)