2 # - drop the addon plugins, say in 2.0?
4 # jquery plugin version
5 %define field_ver 0.9.2
7 Summary: jQuery JavaScript Library
8 Summary(pl.UTF-8): Biblioteka JavaScriptu jQuery
13 Group: Applications/WWW
14 Source0: http://code.jquery.com/%{name}-%{version}.min.js
15 # Source0-md5: 4f252523d4af0b478c810c2547a63e19
16 Source10: http://code.jquery.com/%{name}-%{version}.js
17 # Source10-md5: fb2d334dabf4902825df4fe6c2298b4b
19 Source12: lighttpd.conf
20 Source1: http://plugins.jquery.com/files/%{name}.field.%{field_ver}.zip
21 # Source1-md5: 1bd5d766f79034904a07ddbbab5cb27a
22 Source3: http://marcgrabanski.com/code/ui-datepicker/core/core.ui.datepicker.zip
23 # Source3-md5: 46967b9c5ee626697b977e2909fb00b1
24 Source4: http://www.mikage.to/jquery/%{name}.history.js
25 # Source4-md5: d035c1f13f1795e6d739cd045d6dfb9b
26 URL: http://www.jquery.com/
27 BuildRequires: rpmbuild(macros) >= 1.553
29 Requires: webserver(alias)
30 Suggests: webserver(access)
31 Conflicts: jquery-ui < 1.8.22
33 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
35 %define _webapps /etc/webapps
36 %define _webapp %{name}
37 %define _sysconfdir %{_webapps}/%{_webapp}
38 %define _appdir %{_datadir}/%{name}
41 jQuery is a fast, concise, JavaScript Library that simplifies how you
42 traverse HTML documents, handle events, perform animations, and add
43 Ajax interactions to your web pages.
45 jQuery is designed to change the way that you write JavaScript.
47 This package also provides following jQuery plugins:
48 - jquery.field v%{field_ver},
50 %description -l pl.UTF-8
51 jQuery to szybka biblioteka Javascriptu upraszczająca przetwarzanie
52 dokumentów HTML, obsługę zdarzeń, animacji oraz akcji AJAX w serwisach
55 jQuery został zaprojektowany tak, by zmienić sposób pisania kodu w
58 Pakiet ten dostarcza także dodatkowe wtyczki jQuery:
59 - jquery.field v%{field_ver},
64 cp -p %{SOURCE0} jquery.min.js
65 cp -p %{SOURCE10} jquery.src.js
68 %{__sed} -i -e '/@ sourceMappingURL/d' jquery.min.js
71 rm -rf $RPM_BUILD_ROOT
72 install -d $RPM_BUILD_ROOT%{_appdir}/plugins
74 cp -p jquery.min.js $RPM_BUILD_ROOT%{_appdir}/jquery-%{version}.min.js
75 cp -p jquery.src.js $RPM_BUILD_ROOT%{_appdir}/jquery-%{version}.js
76 mver=%(echo %{version} | cut -d. -f1,2)
77 ln -s jquery-%{version}.min.js $RPM_BUILD_ROOT%{_appdir}/jquery-$mver.js
78 ln -s jquery-%{version}.min.js $RPM_BUILD_ROOT%{_appdir}/jquery.min.js
79 ln -s jquery-%{version}.min.js $RPM_BUILD_ROOT%{_appdir}/jquery.js
83 # http://plugins.jquery.com/project/field, MIT/GPL v0.7
84 cp -p jquery.field.min.js $RPM_BUILD_ROOT%{_appdir}/plugins/field.js
86 # http://www.mikage.to/jquery/jquery_history.html, MIT
87 cp -p jquery.history.js $RPM_BUILD_ROOT%{_appdir}/plugins/history.js
89 # http://marcgrabanski.com/pages/code/jquery-ui-datepicker, MIT/GPL v3.4.3
90 cp -p ui.datepicker.{js,css} $RPM_BUILD_ROOT%{_appdir}/plugins
92 install -d $RPM_BUILD_ROOT%{_sysconfdir}
93 cp -p %{SOURCE11} $RPM_BUILD_ROOT%{_sysconfdir}/apache.conf
94 cp -p %{SOURCE12} $RPM_BUILD_ROOT%{_sysconfdir}/lighttpd.conf
95 cp -p $RPM_BUILD_ROOT%{_sysconfdir}/{apache,httpd}.conf
98 rm -rf $RPM_BUILD_ROOT
100 %triggerin -- apache1 < 1.3.37-3, apache1-base
101 %webapp_register apache %{_webapp}
103 %triggerun -- apache1 < 1.3.37-3, apache1-base
104 %webapp_unregister apache %{_webapp}
106 %triggerin -- apache < 2.2.0, apache-base
107 %webapp_register httpd %{_webapp}
109 %triggerun -- apache < 2.2.0, apache-base
110 %webapp_unregister httpd %{_webapp}
112 %triggerin -- lighttpd
113 %webapp_register lighttpd %{_webapp}
115 %triggerun -- lighttpd
116 %webapp_unregister lighttpd %{_webapp}
119 %defattr(644,root,root,755)
120 %doc field.plugin.htm
121 %dir %attr(750,root,http) %{_sysconfdir}
122 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/apache.conf
123 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/httpd.conf
124 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/lighttpd.conf
127 %dir %{_appdir}/plugins
128 %{_appdir}/plugins/*.js
129 %{_appdir}/plugins/*.css