]>
Commit | Line | Data |
---|---|---|
2d4880c3 | 1 | %define subver 2022-01-23 |
e160702a | 2 | %define ver %(echo %{subver} | tr -d -) |
4492f0b8 | 3 | %define plugin move |
2d4880c3 | 4 | %define php_min_version 5.3.0 |
4492f0b8 ER |
5 | Summary: Move pages, media files and namespaces while maintaining the link structure |
6 | Name: dokuwiki-plugin-%{plugin} | |
e160702a | 7 | Version: %{ver} |
4492f0b8 ER |
8 | Release: 1 |
9 | License: GPL v2 | |
10 | Group: Applications/WWW | |
2d4880c3 ER |
11 | Source0: https://github.com/michitux/dokuwiki-plugin-move/archive/%{subver}/%{plugin}-%{subver}.tar.gz |
12 | # Source0-md5: b6ac00200df22eb9b76376ef240fb7b7 | |
4492f0b8 | 13 | URL: https://www.dokuwiki.org/plugin:move |
2d4880c3 ER |
14 | BuildRequires: rpm-php-pearprov >= 4.4.2-11 |
15 | BuildRequires: rpmbuild(find_lang) >= 1.41 | |
16 | BuildRequires: rpmbuild(macros) >= 1.745 | |
4492f0b8 | 17 | BuildRequires: sed >= 4.0 |
4492f0b8 | 18 | Requires: dokuwiki >= 20131208 |
2d4880c3 | 19 | Requires: php(core) >= %{php_min_version} |
4492f0b8 ER |
20 | BuildArch: noarch |
21 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
22 | ||
23 | %define dokuconf /etc/webapps/dokuwiki | |
24 | %define dokudir /usr/share/dokuwiki | |
25 | %define plugindir %{dokudir}/lib/plugins/%{plugin} | |
26 | ||
27 | %description | |
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 | |
32 | nothing else. | |
33 | ||
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 | |
37 | Christoph Jähnigen. | |
38 | ||
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. | |
42 | ||
43 | %prep | |
44 | %setup -qc | |
2d4880c3 | 45 | mv *-%{plugin}-*/{.??*,*} . |
4492f0b8 | 46 | |
2d4880c3 ER |
47 | rm .github/workflows/phpTestLinux.yml |
48 | rm deleted.files | |
4492f0b8 ER |
49 | |
50 | %build | |
51 | version=$(awk '/^date/{print $2}' plugin.info.txt) | |
52 | if [ "$(echo "$version" | tr -d -)" != %{version} ]; then | |
53 | : %%{version} mismatch | |
54 | exit 1 | |
55 | fi | |
56 | ||
57 | %install | |
58 | rm -rf $RPM_BUILD_ROOT | |
59 | install -d $RPM_BUILD_ROOT%{plugindir} | |
60 | cp -a . $RPM_BUILD_ROOT%{plugindir} | |
61 | ||
62 | %{__rm} $RPM_BUILD_ROOT%{plugindir}/README | |
63 | %{__rm} -r $RPM_BUILD_ROOT%{plugindir}/_test | |
64 | ||
2d4880c3 ER |
65 | %find_lang %{name}.lang --with-dokuwiki |
66 | ||
4492f0b8 ER |
67 | %clean |
68 | rm -rf $RPM_BUILD_ROOT | |
69 | ||
2d4880c3 | 70 | %files -f %{name}.lang |
4492f0b8 ER |
71 | %defattr(644,root,root,755) |
72 | %doc README | |
73 | %dir %{plugindir} | |
74 | %{plugindir}/*.js | |
75 | %{plugindir}/*.less | |
2d4880c3 ER |
76 | %{plugindir}/*.php |
77 | %{plugindir}/*.svg | |
4492f0b8 ER |
78 | %{plugindir}/*.txt |
79 | %{plugindir}/action | |
80 | %{plugindir}/admin | |
81 | %{plugindir}/conf | |
82 | %{plugindir}/helper | |
83 | %{plugindir}/images | |
84 | %{plugindir}/script |