- up to 2012-08-08
[packages/dokuwiki-plugin-lightbox.git] / dokuwiki-plugin-lightbox.spec
1 %define         plugin          lightbox
2 %define         ver                     2012-08-08
3 %define         rpmver          %(echo %{ver} | tr -d -)
4 Summary:        DokuWiki Lightbox plugin
5 Summary(pl.UTF-8):      Wtyczka lightbox dla DokuWiki
6 Name:           dokuwiki-plugin-%{plugin}
7 Version:        %{rpmver}
8 Release:        1
9 License:        GPL v2
10 Group:          Applications/WWW
11 Source0:        https://github.com/downloads/glensc/dokuwiki-plugin-lightboxv2/lightbox-%{ver}.zip
12 # Source0-md5:  3bb365f181fe18520154f8debb9931d4
13 URL:            http://www.dokuwiki.org/plugin:lightboxv2
14 BuildRequires:  unzip
15 Requires:       dokuwiki >= 20111110
16 BuildArch:      noarch
17 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
18
19 %define         dokuconf        /etc/webapps/dokuwiki
20 %define         dokudir         /usr/share/dokuwiki
21 %define         plugindir       %{dokudir}/lib/plugins/%{plugin}
22
23 %description
24 Plugin to integrate Lightbox JavaScript animation in DokuWiki.
25
26 %prep
27 %setup -qc
28 mv %{plugin}/* .
29
30 version=$(awk '/^date/{print $2}' plugin.info.txt)
31 if [ $(echo "$version" | tr -d -) != %{version} ]; then
32         : %%{version} mismatch, should be: $(echo "$version" | tr -d -)
33         exit 1
34 fi
35
36 %install
37 rm -rf $RPM_BUILD_ROOT
38 install -d $RPM_BUILD_ROOT%{plugindir}
39 cp -a . $RPM_BUILD_ROOT%{plugindir}
40 %{__rm} $RPM_BUILD_ROOT%{plugindir}/AUTHORS
41
42 %clean
43 rm -rf $RPM_BUILD_ROOT
44
45 %post
46 # force css cache refresh
47 if [ -f %{dokuconf}/local.php ]; then
48         touch %{dokuconf}/local.php
49 fi
50
51 %files
52 %defattr(644,root,root,755)
53 %doc AUTHORS
54 %dir %{plugindir}
55 %{plugindir}/*.css
56 %{plugindir}/*.js
57 %{plugindir}/*.php
58 %{plugindir}/*.txt
59 %{plugindir}/images
This page took 0.077105 seconds and 3 git commands to generate.