+# NOTE
+# - to look for new version, use update-source.sh script
+
+%define svnrev 64615
+%define rel 1
Summary: Google Chrome
Name: google-chrome
-Version: 4.0.249.30
-Release: 0.1
+Version: 7.0.517.44
+Release: %{svnrev}.%{rel}
License: Multiple, see http://chrome.google.com/
Group: Applications/Networking
-Source0: http://dl.google.com/linux/direct/%{name}-beta_current_i386.rpm
-# Source0-md5: bf85e5d8d366fbe06606ab7bb5dadeac
-Source1: http://dl.google.com/linux/direct/%{name}-beta_current_x86_64.rpm
-# Source1-md5: 7e04f041372489e5249ccb7f9b661186
+Source0: http://dl.google.com/linux/rpm/stable/i386/%{name}-stable-%{version}-%{svnrev}.i386.rpm
+# Source0-md5: 97c1267255f6ec6f320c1f830d9c5907
+Source1: http://dl.google.com/linux/rpm/stable/x86_64/%{name}-stable-%{version}-%{svnrev}.x86_64.rpm
+# Source1-md5: 4457802e6e7111ce25cbd1c599854ad7
Source2: %{name}.sh
Source4: find-lang.sh
+Patch0: chrome-desktop.patch
URL: http://chrome.google.com/
BuildRequires: rpm-utils
BuildRequires: rpmbuild(macros) >= 1.453
+BuildRequires: sed >= 4.0
Requires: browser-plugins >= 2.0
Requires: nspr
Requires: nss
Google Chrome is a browser that combines a minimal design with
sophisticated technology to make the web faster, safer, and easier.
+%description -l hu.UTF-8
+Webböngésző a Google-től.
+
+Google Chrome egy böngésző, amely a minimalista külsőt házasítja össze
+a kifinomult technológiával, hogy a webböngészés gyorsabb,
+biztonságosabb és könnyebb legyen.
+
%prep
%setup -qcT
%ifarch %{ix86}
-rpm2cpio %{SOURCE0} | cpio -i -d
+SOURCE=%{S:0}
%endif
%ifarch %{x8664}
-rpm2cpio %{SOURCE1} | cpio -i -d
+SOURCE=%{S:1}
%endif
+V=$(rpm -qp --nodigest --nosignature --qf '%{V}' $SOURCE)
+R=$(rpm -qp --nodigest --nosignature --qf '%{R}' $SOURCE)
+if [ version:$V != version:%{version} -o svnrev:$R != svnrev:%{svnrev} ]; then
+ exit 1
+fi
+rpm2cpio $SOURCE | cpio -i -d
+
mv opt/google/chrome .
mv usr/share/man/man1/* .
mv usr/share/gnome-control-center/default-apps .
+mv chrome/default-app-block .
mv chrome/product_logo_*.{png,xpm} .
mv chrome/google-chrome.desktop .
mv chrome/google-chrome .
chmod a+x chrome/lib*.so*
+# included in gnome-control-center-2.28.1-3
+rm default-app-block default-apps/google-chrome.xml
+
%ifarch %{x8664}
# go figure, 32bit one doesn't have it compressed
gzip -d *.1.gz
%endif
+%patch0 -p1
+
%{__sed} -e 's,@localedir@,%{_libdir}/%{name},' %{SOURCE4} > find-lang.sh
-%{__sed} -i -e 's;/opt/google/chrome;%{_libdir}/%{name};' chrome/default-app-block
+%{__sed} -i 's;/opt/google/chrome/product_logo_48.png;%{name}.png;' google-chrome.desktop
+%{__sed} -i 's;/opt/google/chrome;%{_bindir};' google-chrome.desktop
%install
rm -rf $RPM_BUILD_ROOT
%{__sed} -i -e 's,@libdir@,%{_libdir}/%{name},' $RPM_BUILD_ROOT%{_bindir}/%{name}
cp -a chrome/* $RPM_BUILD_ROOT%{_libdir}/%{name}
cp -a 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}
%{_desktopdir}/*.desktop
%dir %{_libdir}/%{name}
%{_libdir}/%{name}/chrome.pak
-%{_libdir}/%{name}/default-app-block
+%{_libdir}/%{name}/resources.pak
%dir %{_libdir}/%{name}/locales
%dir %{_libdir}/%{name}/plugins
%{_libdir}/%{name}/resources
# These unique permissions are intentional and necessary for the sandboxing
%attr(4555,root,root) %{_libdir}/%{name}/chrome-sandbox
+%attr(755,root,root) %{_libdir}/%{name}/libpdf.so
+
+%ifarch %{ix86}
+# flash player
+%{_libdir}/%{name}/plugin.vch
+%attr(755,root,root) %{_libdir}/%{name}/libgcflashplayer.so
+%endif
+
# ffmpeg libs
%attr(755,root,root) %{_libdir}/%{name}/libffmpegsumo.so