]>
Commit | Line | Data |
---|---|---|
9db878fe ER |
1 | %define plugin tag |
2 | Summary: DokuWiki Tag Plugin | |
3 | Name: dokuwiki-plugin-%{plugin} | |
b5442a81 | 4 | Version: 20160116 |
9db878fe ER |
5 | Release: 1 |
6 | License: GPL v2 | |
7 | Group: Applications/WWW | |
b5442a81 ER |
8 | Source0: https://github.com/dokufreaks/plugin-tag/archive/39c0568/%{name}-%{version}.tar.gz |
9 | # Source0-md5: cc1b3fd8eabd3fbf468d04e1c7e467b5 | |
10 | URL: https://www.dokuwiki.org/plugin:tag | |
11 | Requires: dokuwiki >= 20131208 | |
9db878fe ER |
12 | BuildArch: noarch |
13 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
14 | ||
bc9c3712 | 15 | %define dokuconf /etc/webapps/dokuwiki |
9db878fe ER |
16 | %define dokudir /usr/share/dokuwiki |
17 | %define plugindir %{dokudir}/lib/plugins/%{plugin} | |
4486118a | 18 | %define find_lang %{_usrlibrpm}/dokuwiki-find-lang.sh %{buildroot} |
9db878fe ER |
19 | |
20 | %description | |
21 | The Tag Plugin lets you assign category tags to wiki pages. It will | |
22 | display a list of links to the tag pages in the tag namespace | |
23 | specified in the configuration. | |
24 | ||
25 | %prep | |
4486118a ER |
26 | %setup -qc |
27 | mv *-%{plugin}-*/* . | |
b5442a81 | 28 | rm -r _test |
4486118a | 29 | |
b5442a81 | 30 | %build |
4486118a ER |
31 | version=$(awk '/^date/{print $2}' plugin.info.txt) |
32 | if [ "$(echo "$version" | tr -d -)" != %{version} ]; then | |
33 | : %%{version} mismatch | |
db893b2f | 34 | fi |
9db878fe ER |
35 | |
36 | %install | |
37 | rm -rf $RPM_BUILD_ROOT | |
38 | install -d $RPM_BUILD_ROOT%{plugindir} | |
39 | cp -a . $RPM_BUILD_ROOT%{plugindir} | |
b5442a81 | 40 | rm $RPM_BUILD_ROOT%{plugindir}/{COPYING,README} |
9db878fe | 41 | |
4486118a | 42 | %find_lang %{name}.lang |
9db878fe ER |
43 | |
44 | %clean | |
45 | rm -rf $RPM_BUILD_ROOT | |
46 | ||
bc9c3712 ER |
47 | %post |
48 | # force css cache refresh | |
49 | if [ -f %{dokuconf}/local.php ]; then | |
50 | touch %{dokuconf}/local.php | |
51 | fi | |
52 | ||
9db878fe ER |
53 | %files -f %{name}.lang |
54 | %defattr(644,root,root,755) | |
4486118a | 55 | %doc README |
9db878fe | 56 | %dir %{plugindir} |
9db878fe ER |
57 | %{plugindir}/*.css |
58 | %{plugindir}/*.js | |
4486118a ER |
59 | %{plugindir}/*.php |
60 | %{plugindir}/*.txt | |
9db878fe ER |
61 | %{plugindir}/conf |
62 | %{plugindir}/images | |
63 | %{plugindir}/syntax |