packages: jquery-lightbox/jquery-lightbox.spec - alternative, slightly bett...
glen
glen at pld-linux.org
Sun Jan 1 21:55:45 CET 2012
Author: glen Date: Sun Jan 1 20:55:45 2012 GMT
Module: packages Tag: HEAD
---- Log message:
- alternative, slightly better implementation
---- Files affected:
packages/jquery-lightbox:
jquery-lightbox.spec (1.2 -> 1.3)
---- Diffs:
================================================================
Index: packages/jquery-lightbox/jquery-lightbox.spec
diff -u packages/jquery-lightbox/jquery-lightbox.spec:1.2 packages/jquery-lightbox/jquery-lightbox.spec:1.3
--- packages/jquery-lightbox/jquery-lightbox.spec:1.2 Sun Jan 1 21:33:02 2012
+++ packages/jquery-lightbox/jquery-lightbox.spec Sun Jan 1 21:55:40 2012
@@ -2,16 +2,18 @@
# TODO
# - demo package
%define plugin lightbox
-Summary: jQuery lightBox plugin
+Summary: jQuery lightbox plugin
Name: jquery-%{plugin}
Version: 0.5
-Release: 1
-License: CC BY-SA 2.5
+Release: 2
+License: BSD
Group: Applications/WWW
-Source0: http://leandrovieira.com/projects/jquery/lightbox/releases/jquery-lightbox-%{version}.zip
-# Source0-md5: 6ea2479de1e85b45993c1cfa9bacf15f
-URL: http://leandrovieira.com/projects/jquery/lightbox
+Source0: https://github.com/downloads/krewenki/jquery-lightbox/jquery-lightbox.zip
+# Source0-md5: b374adbfd69b1b484b6876fb4872b125
+URL: http://krewenki.github.com/jquery-lightbox/
+BuildRequires: closure-compiler
BuildRequires: rpmbuild(macros) >= 1.268
+BuildRequires: unzip
BuildRequires: yuicompressor
Requires: jquery >= 1.2.3
BuildArch: noarch
@@ -20,34 +22,50 @@
%define _appdir %{_datadir}/jquery/%{plugin}
%description
-jQuery lightBox plugin is simple, elegant, unobtrusive, no need extra
-markup and is used to overlay images on the current page through the
-power and flexibility of jQuery's selector.
-
-lightBox is a plugin for jQuery. It was inspired in Lightbox JS by
-Lokesh Dhakar.
+jQuery Lightbox is a simple port of the popular lightbox script, which
+is based on prototype and scriptaculous, to jQuery.
%prep
-%setup -qc
+%setup -qn %{name}
+
+%{__sed} -i -e 's,\.\./images/,images/,g' css/*.css
%build
install -d build/css
-css=css/jquery.lightbox-0.5.css
-yuicompressor --charset UTF-8 --type css $css -o build/$css
+
+# compress .js
+js=jquery.%{plugin}.js
+out=build/$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
+
+%if 0%{!?debug:1}
+css=css/%{plugin}.css
+# compress with yui to get rid of comments, etc
+yuicompressor --charset UTF-8 $css -o build/$css
+%else
+cp -p $css build/$css
+%endif
%install
rm -rf $RPM_BUILD_ROOT
install -d $RPM_BUILD_ROOT%{_appdir}
-cp -p js/jquery.%{plugin}-%{version}.min.js $RPM_BUILD_ROOT%{_appdir}/%{plugin}-%{version}.min.js
-cp -p js/jquery.%{plugin}-%{version}.js $RPM_BUILD_ROOT%{_appdir}/%{plugin}-%{version}.js
+cp -p build/jquery.%{plugin}.js $RPM_BUILD_ROOT%{_appdir}/%{plugin}-%{version}.min.js
+cp -p jquery.%{plugin}.js $RPM_BUILD_ROOT%{_appdir}/%{plugin}-%{version}.js
ln -s %{plugin}-%{version}.min.js $RPM_BUILD_ROOT%{_appdir}/%{plugin}.js
-cp -p build/css/jquery.%{plugin}-%{version}.css $RPM_BUILD_ROOT%{_appdir}/%{plugin}.css
+cp -p build/css/%{plugin}.css $RPM_BUILD_ROOT%{_appdir}/%{plugin}.css
+cp -a images $RPM_BUILD_ROOT%{_appdir}
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(644,root,root,755)
+%doc LICENSE.txt README.markdown
%{_appdir}
%define date %(echo `LC_ALL="C" date +"%a %b %d %Y"`)
@@ -56,6 +74,9 @@
All persons listed below can be reached at <cvs_login>@pld-linux.org
$Log$
+Revision 1.3 2012/01/01 20:55:40 glen
+- alternative, slightly better implementation
+
Revision 1.2 2012/01/01 20:33:02 glen
- license name
================================================================
---- CVS-web:
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/jquery-lightbox/jquery-lightbox.spec?r1=1.2&r2=1.3&f=u
More information about the pld-cvs-commit
mailing list