]> git.pld-linux.org Git - SPECS.git/blob - jquery-form.spec
SPECS updated Wed 28 Jul 14:48:01 CEST 2021
[SPECS.git] / jquery-form.spec
1 %define         plugin  form
2 Summary:        jQuery Form Plugin
3 Name:           jquery-%{plugin}
4 Version:        2.94
5 Release:        1
6 License:        MIT / GPL
7 Group:          Applications/WWW
8 Source0:        https://github.com/malsup/form/tarball/master/%{name}-%{version}.tgz
9 # Source0-md5:  6f6a530e164d83b44de3a3c41ba68322
10 URL:            http://jquery.malsup.com/form/
11 BuildRequires:  closure-compiler
12 BuildRequires:  js
13 BuildRequires:  rpmbuild(macros) > 1.268
14 Requires:       jquery >= 1.3.2
15 BuildArch:      noarch
16 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
17
18 %define         _appdir %{_datadir}/jquery/%{plugin}
19
20 %description
21 The jQuery Form Plugin allows you to easily and unobtrusively upgrade
22 HTML forms to use AJAX. The main methods, ajaxForm and ajaxSubmit,
23 gather information from the form element to determine how to manage
24 the submit process. Both of these methods support numerous options
25 which allows you to have full control over how the data is submitted.
26 Submitting a form with AJAX doesn't get any easier than this!
27
28 %prep
29 %setup -qc
30 mv *-%{plugin}-*/* .
31
32 %build
33 install -d build
34
35 # compress .js
36 js=jquery.%{plugin}.js
37 out=build/$js
38 %if 0%{!?debug:1}
39 closure-compiler --js $js --charset UTF-8 --js_output_file $out
40 js -C -f $out
41 %else
42 cp -p $js $out
43 %endif
44
45 %install
46 rm -rf $RPM_BUILD_ROOT
47 install -d $RPM_BUILD_ROOT%{_appdir}
48 cp -p jquery.%{plugin}.js $RPM_BUILD_ROOT%{_appdir}/%{plugin}.src.js
49 cp -p build/jquery.%{plugin}.js $RPM_BUILD_ROOT%{_appdir}/%{plugin}.min.js
50 ln -s %{plugin}.min.js $RPM_BUILD_ROOT%{_appdir}/%{plugin}.js
51
52 %clean
53 rm -rf $RPM_BUILD_ROOT
54
55 %files
56 %defattr(644,root,root,755)
57 %{_appdir}
This page took 0.215973 seconds and 3 git commands to generate.