[packages/jquery-fineuploader] renamed to fineuploader. version 3.2
glen
glen at pld-linux.org
Wed Jan 9 14:30:21 CET 2013
commit a2a7139a6ea8fa506eaabd55015ab794af40f93e
Author: Elan Ruusamäe <glen at delfi.ee>
Date: Wed Jan 9 15:29:54 2013 +0200
renamed to fineuploader. version 3.2
jquery-fineuploader.spec | 101 +++++++++++++++++++----------------------------
1 file changed, 40 insertions(+), 61 deletions(-)
---
diff --git a/jquery-fineuploader.spec b/jquery-fineuploader.spec
index 6a430c4..a5db30c 100644
--- a/jquery-fineuploader.spec
+++ b/jquery-fineuploader.spec
@@ -1,27 +1,24 @@
-%define plugin fileuploader
+%define plugin fineuploader
Summary: Multiple file upload plugin with progress-bar, drag-and-drop
-Name: js-%{plugin}
-Version: 2.0
-Release: 2
+Name: jquery-%{plugin}
+Version: 3.1
+Release: 1
License: MIT, GPL v2 or LGPL v2
Group: Applications/WWW
-Source0: https://github.com/downloads/valums/file-uploader/%{version}.zip
-# Source0-md5: 0b45522b5337b38e1720dc9600337b5d
+Source0: https://github.com/valums/file-uploader/archive/%{version}.tar.gz?/%{plugin}-%{version}.tgz
+# Source0-md5: 0b8ec22531da912bb5637ae34abf24ba
URL: https://github.com/valums/file-uploader
BuildRequires: closure-compiler
BuildRequires: js
BuildRequires: unzip
BuildRequires: yuicompressor
-Requires: webserver(access)
-Requires: webserver(alias)
+Requires: jquery
#Obsoletes: js-ajax-upload
+#Obsoletes: js-fileuploader
BuildArch: noarch
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
-%define _webapps /etc/webapps
-%define _webapp %{name}
-%define _sysconfdir %{_webapps}/%{_webapp}
-%define _appdir %{_datadir}/%{_webapp}
+%define _appdir %{_datadir}/jquery/%{plugin}
%description
This project attempts to achieve a user-friendly file-uploading
@@ -46,28 +43,13 @@ Demonstrations and samples for %{plugin}.
%prep
%setup -qc
-
-# Apache1/Apache2 config
-cat > apache.conf <<'EOF'
-Alias /js/%{plugin} %{_appdir}
-<Directory %{_appdir}>
- Allow from all
- Options +FollowSymLinks
-</Directory>
-EOF
-
-# lighttpd config
-cat > lighttpd.conf <<'EOF'
-alias.url += (
- "/js/%{plugin}" => "%{_appdir}",
-)
-EOF
+mv file-uploader-%{version}/* .
%build
install -d build
# pack .css
-for css in *.css; do
+for css in client/*.css; do
out=build/${css#*/}
%if 0%{!?debug:1}
yuicompressor --charset UTF-8 $css -o $out
@@ -76,53 +58,50 @@ for css in *.css; do
%endif
done
+# combine .js, based on build.gradle
+coreFiles=client/js/{header,util,button,uploader.basic,dnd,uploader,handler.base,handler.form,handler.xhr}.js
+jQueryPluginFiles=client/js/jquery-plugin.js
+
+cat $coreFiles > build/%{plugin}.js
+cat $coreFiles $jQueryPluginFiles > build/jquery.%{plugin}.js
+
+# compress .js
+for js in build/*.js; do
+ fn=${js#*/}
+ out=build/${fn%*.js}.min.js
+ %if 0%{!?debug:1}
+ closure-compiler --js $js --charset UTF-8 --js_output_file $out
+ js -C -f $out
+ %else
+ cp -p $js $out
+ %endif
+done
+
%install
rm -rf $RPM_BUILD_ROOT
install -d $RPM_BUILD_ROOT{%{_appdir},%{_examplesdir}/%{name}-%{version}}
-cp -p %{plugin}.min.js $RPM_BUILD_ROOT%{_appdir}/%{plugin}-%{version}.min.js
-cp -p %{plugin}.js $RPM_BUILD_ROOT%{_appdir}/%{plugin}-%{version}.js
+cp -p build/jquery.%{plugin}.min.js $RPM_BUILD_ROOT%{_appdir}/%{plugin}-%{version}.min.js
+cp -p build/jquery.%{plugin}.js $RPM_BUILD_ROOT%{_appdir}/%{plugin}-%{version}.js
ln -s %{plugin}-%{version}.min.js $RPM_BUILD_ROOT%{_appdir}/%{plugin}.js
-cp -p %{plugin}.css $RPM_BUILD_ROOT%{_appdir}/%{plugin}-%{version}.css
+# package plain js version too
+cp -p build/%{plugin}.min.js $RPM_BUILD_ROOT%{_appdir}/js.%{plugin}-%{version}.min.js
+cp -p build/%{plugin}.js $RPM_BUILD_ROOT%{_appdir}/js.%{plugin}-%{version}.js
+ln -s js.%{plugin}-%{version}.min.js $RPM_BUILD_ROOT%{_appdir}/js.%{plugin}.js
+
+cp -p client/%{plugin}.css $RPM_BUILD_ROOT%{_appdir}/%{plugin}-%{version}.css
cp -p build/%{plugin}.css $RPM_BUILD_ROOT%{_appdir}/%{plugin}-%{version}.min.css
ln -s %{plugin}-%{version}.min.css $RPM_BUILD_ROOT%{_appdir}/%{plugin}.css
-cp -p loading.gif $RPM_BUILD_ROOT%{_appdir}
-
-cp -a *.htm $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
+cp -p client/loading.gif $RPM_BUILD_ROOT%{_appdir}
-install -d $RPM_BUILD_ROOT%{_sysconfdir}
-cp -p apache.conf $RPM_BUILD_ROOT%{_sysconfdir}/apache.conf
-cp -p apache.conf $RPM_BUILD_ROOT%{_sysconfdir}/httpd.conf
-cp -p lighttpd.conf $RPM_BUILD_ROOT%{_sysconfdir}/lighttpd.conf
+cp -a test/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
%clean
rm -rf $RPM_BUILD_ROOT
-%triggerin -- apache1 < 1.3.37-3, apache1-base
-%webapp_register apache %{_webapp}
-
-%triggerun -- apache1 < 1.3.37-3, apache1-base
-%webapp_unregister apache %{_webapp}
-
-%triggerin -- apache < 2.2.0, apache-base
-%webapp_register httpd %{_webapp}
-
-%triggerun -- apache < 2.2.0, apache-base
-%webapp_unregister httpd %{_webapp}
-
-%triggerin -- lighttpd
-%webapp_register lighttpd %{_webapp}
-
-%triggerun -- lighttpd
-%webapp_unregister lighttpd %{_webapp}
-
%files
%defattr(644,root,root,755)
-%dir %attr(750,root,http) %{_sysconfdir}
-%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/apache.conf
-%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/httpd.conf
-%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/lighttpd.conf
%{_appdir}
%files demo
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/jquery-fineuploader.git/commitdiff/a2a7139a6ea8fa506eaabd55015ab794af40f93e
More information about the pld-cvs-commit
mailing list