]> git.pld-linux.org Git - SPECS.git/blob - jquery-knob.spec
SPECS updated Tue 30 Apr 15:13:02 CEST 2024
[SPECS.git] / jquery-knob.spec
1 # TODO
2 # - paths and deps for demo
3 %define         plugin  knob
4 Summary:        Nice, downward compatible, touchable, jQuery dial
5 Name:           jquery-%{plugin}
6 Version:        1.2.0
7 Release:        1
8 License:        MIT and GPL
9 Group:          Applications/WWW
10 Source0:        https://github.com/aterrien/jQuery-Knob/tarball/master/%{name}-%{version}.tgz
11 # Source0-md5:  acf069e9fd3ae21bdd7f77383b73cd42
12 URL:            http://anthonyterrien.com/knob/
13 BuildRequires:  closure-compiler
14 BuildRequires:  rpmbuild(macros) >= 1.268
15 BuildRequires:  unzip
16 Requires:       jquery >= 1.7
17 BuildArch:      noarch
18 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
19
20 %define         _appdir %{_datadir}/jquery/%{plugin}
21
22 %description
23 jQuery Knob:
24 - canvas based; no png or jpg sprites.
25 - touch, mouse and mousewheel, keyboard events implemented.
26 - downward compatible; overloads an input element.
27
28 %package demo
29 Summary:        Demo for jQuery.%{plugin}
30 Summary(pl.UTF-8):      Pliki demonstracyjne dla pakietu jQuery.%{plugin}
31 Group:          Development
32 Requires:       %{name} = %{version}-%{release}
33
34 %description demo
35 Demonstrations and samples for jQuery.%{plugin}.
36
37 %prep
38 %setup -qc
39 mv *-jQuery-Knob-*/* .
40
41 %build
42 install -d build/js
43
44 # compress .js
45 for js in js/*.js; do
46         out=build/${js#*/jquery.}
47 %if 0%{!?debug:1}
48         yuicompressor --charset UTF-8 $js -o $out
49         js -C -f $out
50 %else
51         cp -a $js $out
52 %endif
53 done
54
55 %install
56 rm -rf $RPM_BUILD_ROOT
57 install -d $RPM_BUILD_ROOT%{_appdir}
58 cp -p build/%{plugin}.js  $RPM_BUILD_ROOT%{_appdir}/%{plugin}-%{version}.min.js
59 cp -p js/jquery.%{plugin}.js $RPM_BUILD_ROOT%{_appdir}/%{plugin}-%{version}.js
60 ln -s %{plugin}-%{version}.min.js $RPM_BUILD_ROOT%{_appdir}/%{plugin}.js
61
62 install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
63 cp -a index.html $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
64
65 %clean
66 rm -rf $RPM_BUILD_ROOT
67
68 %files
69 %defattr(644,root,root,755)
70 %doc README.md
71 %{_appdir}
72
73 %files demo
74 %defattr(644,root,root,755)
75 %{_examplesdir}/%{name}-%{version}
This page took 0.709301 seconds and 3 git commands to generate.