packages: google-chrome/google-chrome.spec - install hicolor icons instead ...

glen glen at pld-linux.org
Wed Jan 18 09:11:15 CET 2012


Author: glen                         Date: Wed Jan 18 08:11:15 2012 GMT
Module: packages                      Tag: HEAD
---- Log message:
- install hicolor icons instead of pixmaps. see http://crbug.com/110339

---- Files affected:
packages/google-chrome:
   google-chrome.spec (1.40 -> 1.41) 

---- Diffs:

================================================================
Index: packages/google-chrome/google-chrome.spec
diff -u packages/google-chrome/google-chrome.spec:1.40 packages/google-chrome/google-chrome.spec:1.41
--- packages/google-chrome/google-chrome.spec:1.40	Wed Jan 18 09:08:26 2012
+++ packages/google-chrome/google-chrome.spec	Wed Jan 18 09:11:10 2012
@@ -23,6 +23,7 @@
 BuildRequires:	rpmbuild(macros) >= 1.453
 BuildRequires:	sed >= 4.0
 Requires:	browser-plugins >= 2.0
+Requires:	hicolor-icon-theme
 Requires:	xdg-utils >= 1.0.2-4
 Provides:	wwwbrowser
 ExclusiveArch:	%{ix86} %{x8664}
@@ -98,7 +99,7 @@
 
 %install
 rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT{%{_bindir},%{_libdir}/%{name}/plugins,%{_mandir}/man1,%{_pixmapsdir},%{_desktopdir},%{_libdir}/%{name}/themes}
+install -d $RPM_BUILD_ROOT{%{_bindir},%{_libdir}/%{name}/plugins,%{_mandir}/man1,%{_desktopdir},%{_libdir}/%{name}/themes}
 
 install -p %{SOURCE2} $RPM_BUILD_ROOT%{_bindir}/%{name}
 %{__sed} -i -e 's, at libdir@,%{_libdir}/%{name},' $RPM_BUILD_ROOT%{_bindir}/%{name}
@@ -106,8 +107,15 @@
 cp -p google-chrome.1 $RPM_BUILD_ROOT%{_mandir}/man1
 # for google-chrome --help
 echo ".so google-chrome.1" > $RPM_BUILD_ROOT%{_mandir}/man1/chrome.1
-cp -a product_logo_48.png $RPM_BUILD_ROOT%{_pixmapsdir}/%{name}.png
-cp -a google-chrome.desktop $RPM_BUILD_ROOT%{_desktopdir}
+cp -p google-chrome.desktop $RPM_BUILD_ROOT%{_desktopdir}
+
+for icon in product_logo_*.png; do
+	size=${icon##product_logo_}
+	size=${size%.png}
+
+	install -d $RPM_BUILD_ROOT%{_iconsdir}/hicolor/${size}x${size}/apps
+	cp -p $icon $RPM_BUILD_ROOT%{_iconsdir}/hicolor/${size}x${size}/apps/%{name}.png
+done
 
 %browser_plugins_add_browser %{name} -p %{_libdir}/%{name}/plugins
 
@@ -118,10 +126,12 @@
 rm -rf $RPM_BUILD_ROOT
 
 %post
+%update_icon_cache hicolor
 %update_browser_plugins
 
 %postun
 if [ "$1" = 0 ]; then
+	%update_icon_cache hicolor
 	%update_browser_plugins
 fi
 
@@ -133,8 +143,9 @@
 
 %attr(755,root,root) %{_bindir}/%{name}
 %{_mandir}/man1/*.1*
-%{_pixmapsdir}/%{name}.png
 %{_desktopdir}/*.desktop
+%{_iconsdir}/hicolor/*/apps/%{name}.png
+
 %dir %{_libdir}/%{name}
 %{_libdir}/%{name}/chrome.pak
 %{_libdir}/%{name}/resources.pak
@@ -171,6 +182,9 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.41  2012/01/18 08:11:10  glen
+- install hicolor icons instead of pixmaps. see http://crbug.com/110339
+
 Revision 1.40  2012/01/18 08:08:26  glen
 - do not package nspr/nss symlinks; no longer needed
 
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/google-chrome/google-chrome.spec?r1=1.40&r2=1.41&f=u



More information about the pld-cvs-commit mailing list