LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Blogs > unSpawn
User Name
Password

Notices

Rate this Entry

RPM-repackaging google-earth-stable_current for Fedora

Posted 06-14-2014 at 03:34 AM by unSpawn

Code:
Transaction check error:
  file /usr/bin from install of google-earth-stable conflicts with file from package filesystem
While the above error and its fixes are documented well enough across the 'net I'm listing my own spec for future reference. You should probably not want to use this but if you do just save below code as "google-earth-stable.spec" and run it as 'rpmbuild -bb google-earth-stable.spec;'.

Code:
%define __os_install_post  /usr/lib/rpm/brp-compress %{nil}
%define debug_packages  %{nil}
%define debug_package %{nil}
%define name google-earth-stable
%define ver 7.1.2.2041
%define rel 0
Name: %{name}
Summary: Google Earth repackaged for Fedora 20
Version: %{ver}
Release: %{rel}
License: GPL
Group: Applications/Internet
Source0: google-earth-stable_current_i386.rpm
Provides: %{name}
Buildarch: i386
Vendor: Google Inc.
URL: http://www.google.com/earth

%description
Explore, search and discover the planet

Google Earth lets you fly anywhere to see satellite imagery, 3D buildings, 
3D trees, terrain, Street View, planets and much more.

Repackaged for Fedora 20.


%install
cd $RPM_BUILD_ROOT || exit 1
wget http://dl.google.com/dl/earth/client/current/\
google-earth-stable_current_i386.rpm -O /tmp/google-earth-stable_current_i386.rpm || exit 1
rpm2cpio /tmp/google-earth-stable_current_i386.rpm | cpio -idmv || exit 1
find $RPM_BUILD_ROOT -not -type d -printf "%%%attr(%%m,root,root) %%p\n" \
| sed -e "s|$RPM_BUILD_ROOT||g" > %{_tmppath}/%{name}_contents.txt || exit 1

%files -f %{_tmppath}/%{name}_contents.txt

%changelog
* Sun May 25 2014 - %{packager}
- Repackaged for Fedora 20.
Notes / caveats:
- I left out the multi-distro %postinst script.
- Always verify downloads yourself (and prefer a GnuPG sig over a hash).
- Change the Source0, Buildarch and wget URI if you're using another %{arch}.
- YMMV(VM), as always.
Posted in Uncategorized
Views 136 Comments 0
« Prev     Main     Next »

  



All times are GMT -5. The time now is 11:10 AM.

Main Menu
Advertisement

My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration