packages: google-desktop/google-desktop.spec - one desktop to autostart - s...
glen
glen at pld-linux.org
Sat Jan 30 17:24:23 CET 2010
Author: glen Date: Sat Jan 30 16:24:23 2010 GMT
Module: packages Tag: HEAD
---- Log message:
- one desktop to autostart
- scriptlets from original rpm
- install for forefox bin
---- Files affected:
packages/google-desktop:
google-desktop.spec (1.1 -> 1.2)
---- Diffs:
================================================================
Index: packages/google-desktop/google-desktop.spec
diff -u packages/google-desktop/google-desktop.spec:1.1 packages/google-desktop/google-desktop.spec:1.2
--- packages/google-desktop/google-desktop.spec:1.1 Sat Jan 30 14:16:49 2010
+++ packages/google-desktop/google-desktop.spec Sat Jan 30 17:24:17 2010
@@ -1,10 +1,13 @@
# $Revision$, $Date$
+# TODO
+# - stop bashism in extract_msoffice_content.sh, and make it secure with mktemp use
+# - firefox plugin not firefox 3.x compatible
%define buildid 0088
-%define rel 0.1
+%define rel 0.4
Summary: Google Desktop: Personalize and organize your own computer
Name: google-desktop
Version: 1.2.0
-Release: 0.%{buildid}.%{rel}
+Release: %{buildid}.%{rel}
License: Copyright 2007 Google Inc. All Rights Reserved.
Group: X11/Applications
%ifarch %{ix86}
@@ -18,6 +21,7 @@
NoSource: 1
%endif
URL: http://desktop.google.com/linux/
+Requires: xdg-utils
ExclusiveArch: %{ix86} %{x8664}
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
@@ -32,7 +36,7 @@
%define intdeps libdesktop.so libgdl.so libgdl_firefox.so libgdl_thunderbird.so libbreakpad.so gdl_box
# list of script capabilities (regexps) not to be used in Provides
-%define _noautoprov %{sysdeps} %{intdeps}
+%define _noautoprov %{sysdeps}
# do not require them either
%define _noautoreq %{_noautoprov}
@@ -61,16 +65,77 @@
mv opt/google/desktop/* .
mv etc/cron.hourly .
+sed -i -e 's,/opt/google/desktop,%{_appdir},' bin/{gdlinux,*.sh}
+sed -i -e '
+ s,/opt/google/desktop/bin/,,
+ s,/opt/google/desktop,%{_appdir},
+ s/Categories=.*/Categories=GTK;Network;/
+' xdg/google-gdl.desktop
+
+sed -i -e '
+ s,/opt/google/desktop/bin/,,
+ s,/opt/google/desktop,%{_appdir},
+ s/Categories=.*/Categories=GTK;Settings;/
+' xdg/google-gdl-preferences.desktop
+
+# xdg-utils
+rm bin/{xdg-open,xdg-desktop-menu}
+
%install
rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT{%{_appdir},%{_bindir},%{_desktopdir},/etc/cron.daily,/var/cache/google/desktop}
-cp -a xdg/*.desktop $RPM_BUILD_ROOT%{_desktopdir}
+install -d $RPM_BUILD_ROOT{%{_appdir},%{_bindir},%{_datadir}/autostart,%{_desktopdir},/etc/cron.daily,/var/cache/google/desktop}
+cp -a xdg/google-gdl-preferences.desktop $RPM_BUILD_ROOT%{_desktopdir}
+cp -a xdg/google-gdl.desktop $RPM_BUILD_ROOT%{_datadir}/autostart
cp -a resource plugin lib bin $RPM_BUILD_ROOT%{_appdir}
-ln -s %{_appdir}/bin/gdlinux $RPM_BUILD_ROOT%{_bindir}
+mv $RPM_BUILD_ROOT{%{_appdir}/bin,%{_bindir}}/gdlinux
+
+%if 0
+# XXX seems not needed
+# path inside libraries which we cannot change
+install -d $RPM_BUILD_ROOT/opt/google
+ln -s %{_appdir} $RPM_BUILD_ROOT/opt/google/desktop
+%endif
%clean
rm -rf $RPM_BUILD_ROOT
+%if 0
+# TODO: see first what's the purpose, as it if it is related with browser
+# plugin it is out of sync as browser plugin is installed in trigger
+%post
+# New installation.
+if [ "$1" = "1" ]; then
+ LD_LIBRARY_PATH=%{_appdir}/lib %{_appdir}/bin/gdl_stats install
+elif [ "$1" -gt 1 ]; then
+ LD_LIBRARY_PATH=%{_appdir}/lib %{_appdir}/bin/gdl_stats update
+ killall -USR2 gdl_box 2> /dev/null || :
+fi
+%endif
+
+%postun
+# Delete repositories for all users when uninstall.
+if [ "$1" = "0" ]; then
+ if [ -d /var/cache/google/desktop ]; then
+ for i in /var/cache/google/desktop/*; do
+ # don't remove machine id file.
+ if [ -d "$i" ]; then
+ rm -rf "$i"
+ fi
+ done
+ fi
+fi
+
+%triggerin -- mozilla-firefox-bin
+if [ "$1" = "1" ] && [ "$2" = "1" ]; then
+ ln -snf %{_appdir}/plugin/firefox %{_libdir}/mozilla-firefox-bin/extensions/desktop at google.com
+fi
+
+%triggerun -- mozilla-firefox-bin
+# remove link if either of the packages are gone \
+if [ "$1" = "0" ] || [ "$2" = "0" ]; then
+ rm -f %{_libdir}/mozilla-firefox-bin/extensions/desktop at google.com
+fi
+
%files
%defattr(644,root,root,755)
%doc README VERSION
@@ -83,8 +148,8 @@
%attr(755,root,root) %{_appdir}/lib/*.so*
%{_appdir}/resource
-%{_desktopdir}/google-gdl-preferences.desktop
-%{_desktopdir}/google-gdl.desktop
+%{_datadir}/autostart/*.desktop
+%{_desktopdir}/*.desktop
%dir /var/cache/google
%dir %attr(2777,root,root) /var/cache/google/desktop
@@ -111,6 +176,10 @@
All persons listed below can be reached at <cvs_login>@pld-linux.org
$Log$
+Revision 1.2 2010/01/30 16:24:17 glen
+- one desktop to autostart
+- scriptlets from original rpm
+- install for forefox bin
+
Revision 1.1 2010/01/30 13:16:49 glen
- initial, packaging bits from google-chrome.spec
-
================================================================
---- CVS-web:
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/google-desktop/google-desktop.spec?r1=1.1&r2=1.2&f=u
More information about the pld-cvs-commit
mailing list