]>
Commit | Line | Data |
---|---|---|
2c42ada3 | 1 | %define plugin pagemoveng |
a859a044 JB |
2 | Summary: DokuWiki PageMove plugin |
3 | Summary(pl.UTF-8): Wtyczka PageMove dla DokuWiki | |
c849b8bc | 4 | Name: dokuwiki-plugin-%{plugin} |
2c42ada3 ER |
5 | Version: 20110322 |
6 | Release: 0.1 | |
09e9b04a ER |
7 | License: GPL v2 |
8 | Group: Applications/WWW | |
2c42ada3 ER |
9 | Source0: https://github.com/dokufreaks/plugin-%{plugin}/tarball/master#/%{plugin}.tgz |
10 | # Source0-md5: 9355168bf7f2526dbdce0a33fc3ff2a2 | |
11 | URL: https://github.com/dokufreaks/plugin-pagemoveng | |
09e9b04a ER |
12 | BuildRequires: sed >= 4.0 |
13 | Requires: dokuwiki >= 20060309 | |
14 | BuildArch: noarch | |
15 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
16 | ||
49e78e5e | 17 | %define dokuconf /etc/webapps/dokuwiki |
c849b8bc ER |
18 | %define dokudir /usr/share/dokuwiki |
19 | %define plugindir %{dokudir}/lib/plugins/%{plugin} | |
2c42ada3 | 20 | %define find_lang %{_usrlibrpm}/dokuwiki-find-lang.sh %{buildroot} |
09e9b04a ER |
21 | |
22 | %description | |
23 | This plugin is designed for moving and renaming pages within your Wiki | |
24 | whilst maintaining the integrity of links to and from the page. | |
25 | ||
26 | In full you can: | |
27 | - Rename a page. | |
28 | - Move a page to an existing namspace. | |
29 | - Move a page to a new namespace. | |
30 | - A combination of the above. | |
31 | ||
a859a044 JB |
32 | %description -l pl.UTF-8 |
33 | Ta wtyczka służy do przesuwania i zmiany nazw stron wewnątrz Wiki z | |
34 | zachowaniem integralności odnośników z i do strony. | |
35 | ||
36 | W zupełności można: | |
37 | - usunąć stronę, | |
38 | - przenieść stronę do istniejącej przestrzeni nazw, | |
39 | - przenieść stronę do nowej przestrzeni nazw, | |
40 | - wykonać połączenie powyższych. | |
41 | ||
09e9b04a | 42 | %prep |
2c42ada3 ER |
43 | %setup -qc |
44 | # for github urls: | |
45 | mv *-%{plugin}-*/* . | |
46 | %{__rm} *-%{plugin}-*/.gitignore | |
09e9b04a | 47 | |
2c42ada3 ER |
48 | version=$(awk '/^date/{print $2}' plugin.info.txt) |
49 | if [ "$(echo "$version" | tr -d -)" != %{version} ]; then | |
50 | : %%{version} mismatch | |
51 | # exit 1 | |
52 | fi | |
4dc6cd82 | 53 | |
09e9b04a ER |
54 | %install |
55 | rm -rf $RPM_BUILD_ROOT | |
c849b8bc ER |
56 | install -d $RPM_BUILD_ROOT%{plugindir} |
57 | cp -a . $RPM_BUILD_ROOT%{plugindir} | |
09e9b04a | 58 | |
2c42ada3 ER |
59 | %find_lang %{name}.lang |
60 | ||
09e9b04a ER |
61 | %clean |
62 | rm -rf $RPM_BUILD_ROOT | |
63 | ||
49e78e5e ER |
64 | %post |
65 | # force css cache refresh | |
66 | if [ -f %{dokuconf}/local.php ]; then | |
67 | touch %{dokuconf}/local.php | |
68 | fi | |
69 | ||
2c42ada3 | 70 | %files -f %{name}.lang |
09e9b04a | 71 | %defattr(644,root,root,755) |
c849b8bc | 72 | %dir %{plugindir} |
2c42ada3 ER |
73 | %{plugindir}/*.css |
74 | %{plugindir}/*.js | |
75 | %{plugindir}/*.php | |
76 | %{plugindir}/*.txt |