]> git.pld-linux.org Git - SPECS.git/blob - jquery-spritely.spec
SPECS updated Wed 28 Jul 14:48:01 CEST 2021
[SPECS.git] / jquery-spritely.spec
1 Summary:        jQuery.spritely plugin
2 Name:           jquery-spritely
3 Version:        0.2.1
4 Release:        0.3
5 License:        MIT / GPL v2
6 Group:          Applications/WWW
7 Source0:        http://www.spritely.net/lib/jquery/1.3.2/plugins/jquery.spritely-%{version}.js
8 # Source0-md5:  3eed51a17d30bc6594ab350c84be2a38
9 Source1:        http://www.spritely.net/usr/library/documents/sample-code/spritely-0.2-sample-code.zip
10 # Source1-md5:  096ea7501f24a302cda8f4c0c4d1b0b3
11 URL:            http://www.spritely.net/
12 BuildRequires:  rpmbuild(macros) >= 1.268
13 BuildRequires:  unzip
14 Requires:       jquery >= 1.3
15 # for graggable
16 Suggests:       jquery-ui
17 BuildArch:      noarch
18 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
19
20 %define         _webapps        /etc/webapps
21 %define         _webapp         %{name}
22 %define         _sysconfdir     %{_webapps}/%{_webapp}
23 %define         _appdir         %{_datadir}/jquery
24
25 %description
26 jQuery.spritely is a jQuery plugin for creating dynamic character and
27 background animation in pure HTML and JavaScript. It's a simple,
28 light-weight plugin with a few simple methods for creating animated
29 sprites such as the birds you see on this page, and dynamic scrolling
30 backgrounds.
31
32 %package demo
33 Summary:        Demo for jQuery.spritely
34 Summary(pl.UTF-8):      Pliki demonstracyjne dla pakietu jQuery.spritely
35 Group:          Development
36 Requires:       %{name} = %{epoch}:%{version}-%{release}
37 Requires:       js-sizzle
38 Requires:       jquery-ui
39
40 %description demo
41 Demonstrations and samples for jQuery.spritely.
42
43 %prep
44 %setup -qcT -a1
45 cp -a %{SOURCE0} jquery.spritely.js
46 mv spritely-0.2-sample-code sample-code
47
48 find '(' -name '*.js' -o -name '*.html' ')' -print0 | xargs -0 %{__sed} -i -e 's,\r$,,'
49
50 cd sample-code
51 ln -s %{_appdir}/jquery.js scripts
52 ln -s /usr/share/js-sizzle/sizzle.js scripts
53 ln -s %{_appdir}/jquery.spritely.js scripts
54 ln -s %{_appdir}/ui/ui.core.js scripts
55 ln -s %{_appdir}/ui/ui.draggable.js scripts
56 ln -s %{_appdir}/ui/ui.slider.js scripts
57
58 rm scripts/jquery-1.3.2.min.js
59 rm scripts/jquery-ui-1.7.2.spritely.custom.min.js
60 rm scripts/jquery.spritely-0.2.js
61
62 sed -i -e '
63         s,scripts/jquery-1.3.2.min.js,scripts/jquery.js,
64                 /scripts\/jquery.js/a   <script src="scripts/sizzle.js" type="text/javascript"></script>
65
66         s,scripts/jquery-ui-1.7.2.spritely.custom.min.js,scripts/ui.core.js,
67                 /scripts\/ui.core.js/a  <script src="scripts/ui.draggable.js" type="text/javascript"></script>
68                 /scripts\/ui.core.js/a  <script src="scripts/ui.slider.js" type="text/javascript"></script>
69
70         s,scripts/jquery.spritely-0.2.js,scripts/jquery.spritely.js,
71 ' index.html
72
73 %install
74 rm -rf $RPM_BUILD_ROOT
75 install -d $RPM_BUILD_ROOT{%{_appdir},%{_examplesdir}/%{name}-%{version}}
76 cp -a jquery.spritely.js $RPM_BUILD_ROOT%{_appdir}
77 cp -a sample-code/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
78
79 %clean
80 rm -rf $RPM_BUILD_ROOT
81
82 %files
83 %defattr(644,root,root,755)
84 %{_appdir}/jquery.spritely.js
85
86 %files demo
87 %defattr(644,root,root,755)
88 %{_examplesdir}/%{name}-%{version}
This page took 1.081489 seconds and 3 git commands to generate.