packages: jquery-photoswipe/jquery-photoswipe.spec - install also css and i...

glen glen at pld-linux.org
Wed Jan 18 15:26:21 CET 2012


Author: glen                         Date: Wed Jan 18 14:26:21 2012 GMT
Module: packages                      Tag: HEAD
---- Log message:
- install also css and images

---- Files affected:
packages/jquery-photoswipe:
   jquery-photoswipe.spec (1.1 -> 1.2) 

---- Diffs:

================================================================
Index: packages/jquery-photoswipe/jquery-photoswipe.spec
diff -u packages/jquery-photoswipe/jquery-photoswipe.spec:1.1 packages/jquery-photoswipe/jquery-photoswipe.spec:1.2
--- packages/jquery-photoswipe/jquery-photoswipe.spec:1.1	Thu Dec 22 14:17:30 2011
+++ packages/jquery-photoswipe/jquery-photoswipe.spec	Wed Jan 18 15:26:16 2012
@@ -6,14 +6,17 @@
 Summary:	PhotoSwipe - The web image gallery for your mobile device
 Name:		jquery-%{plugin}
 Version:	3.0.4
-Release:	1
+Release:	2
 License:	MIT
 Group:		Applications/WWW
 Source0:	https://github.com/downloads/codecomputerlove/PhotoSwipe/code.photoswipe-%{version}.zip
 # Source0-md5:	c690d4d8d44c52a695ee04c813b619e7
 URL:		http://www.photoswipe.com/
 BuildRequires:	rpmbuild(macros) >= 1.553
+BuildRequires:	unzip
+BuildRequires:	yuicompressor
 Requires:	jquery
+Requires:	js-klass
 BuildArch:	noarch
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
@@ -37,13 +40,28 @@
 
 %undos -f txt,js
 
+%build
+# pack css
+install -d build
+
+%if 0%{!?debug:1}
+# compress with yui to get rid of comments, etc
+yuicompressor --charset UTF-8 %{plugin}.css -o build/%{plugin}.css
+%else
+cp -p %{plugin}.css build
+%endif
+
 %install
 rm -rf $RPM_BUILD_ROOT
 install -d $RPM_BUILD_ROOT%{_appdir}
-cp -p code.photoswipe.jquery-%{version}.min.js $RPM_BUILD_ROOT%{_appdir}/%{plugin}-%{version}.min.js
-cp -p code.photoswipe.jquery-%{version}.js $RPM_BUILD_ROOT%{_appdir}/%{plugin}-%{version}.js
+cp -p code.%{plugin}.jquery-%{version}.min.js $RPM_BUILD_ROOT%{_appdir}/%{plugin}-%{version}.min.js
+cp -p code.%{plugin}.jquery-%{version}.js $RPM_BUILD_ROOT%{_appdir}/%{plugin}-%{version}.js
 ln -s %{plugin}-%{version}.min.js $RPM_BUILD_ROOT%{_appdir}/%{plugin}.js
 
+# css and media
+cp -p build/%{plugin}.css $RPM_BUILD_ROOT%{_appdir}
+cp -p loader.gif error.gif icons at 2x.png $RPM_BUILD_ROOT%{_appdir}
+
 %clean
 rm -rf $RPM_BUILD_ROOT
 
@@ -58,5 +76,8 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.2  2012/01/18 14:26:16  glen
+- install also css and images
+
 Revision 1.1  2011/12/22 13:17:30  glen
 - new
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/jquery-photoswipe/jquery-photoswipe.spec?r1=1.1&r2=1.2&f=u



More information about the pld-cvs-commit mailing list