- build from src
[packages/dokuwiki-plugin-lightbox.git] / dokuwiki-plugin-lightbox.spec
1 %define         plugin          lightbox
2 Summary:        DokuWiki Lightbox plugin
3 Summary(pl.UTF-8):      Wtyczka lightbox dla DokuWiki
4 Name:           dokuwiki-plugin-%{plugin}
5 Version:        20120103
6 Release:        0.10
7 License:        GPL v2
8 Group:          Applications/WWW
9 #Source0:       https://github.com/downloads/glensc/dokuwiki-plugin-lightboxv2/lightbox-%{version}.tar.bz2
10 Source0:        https://github.com/glensc/dokuwiki-plugin-lightboxv2/tarball/master/%{plugin}-%{version}.tgz
11 # Source0-md5:  156c43be191bebf757874d1a7c8ca67b
12 Source1:        https://github.com/krewenki/jquery-lightbox/tarball/master/jquery-lightbox.tgz
13 # Source1-md5:  14b30ba99c15cf2bb52af3ae21398969
14 URL:            http://www.dokuwiki.org/plugin:lightboxv2
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 -a1
28 mv *-%{plugin}v2-*/* .
29 mv *-jquery-lightbox-*/* jquery-lightbox
30
31 version=$(awk '/^date/{print $2}' plugin.info.txt)
32 if [ $(echo "$version" | tr -d -) != %{version} ]; then
33         : %%{version} mismatch, should be: $(echo "$version" | tr -d -)
34         exit 1
35 fi
36
37 %build
38 sh -x build.sh
39 tar xjf lightbox-*.tar.bz2
40
41 %install
42 rm -rf $RPM_BUILD_ROOT
43 cd %{plugin}
44 install -d $RPM_BUILD_ROOT%{plugindir}
45 cp -a . $RPM_BUILD_ROOT%{plugindir}
46 %{__rm} $RPM_BUILD_ROOT%{plugindir}/AUTHORS
47
48 %clean
49 rm -rf $RPM_BUILD_ROOT
50
51 %post
52 # force css cache refresh
53 if [ -f %{dokuconf}/local.php ]; then
54         touch %{dokuconf}/local.php
55 fi
56
57 %files
58 %defattr(644,root,root,755)
59 %doc AUTHORS
60 %dir %{plugindir}
61 %{plugindir}/*.css
62 %{plugindir}/*.js
63 %{plugindir}/*.txt
64 %{plugindir}/images
This page took 0.03617 seconds and 3 git commands to generate.