File genymotion.spec of Package genymotion
Name: genymotion
Version: 3.8.0
Release: 1
Url: https://www.genymotion.com/download/
Summary: Complete set of tools that provides a virtual environment for Android
Group: Productivity/Office/Suite
Requires: virtualbox
License: SUSE-NonFree
Source0: %{name}.bin
Source1: %{name}.rpmlintrc
BuildRequires: desktop-file-utils
%if 0%{?suse_version}
BuildRequires: update-desktop-files
%endif
# %if 0%{?suse_version}
# BuildRequires: -post-build-checks
# %endif
BuildRequires: hicolor-icon-theme
%description
Complete set of tools that provides a virtual environment for Android
%prep
%build
%install
mkdir -p {%{buildroot}/opt,%{buildroot}/opt/%{name},%{buildroot}%{_bindir},%{buildroot}%{_datadir}}
# unpack binary
src=%{SOURCE0}
# Retrieve line number where tar.bzip2 binary begins
skip=$(awk '/^__TARFILE_FOLLOWS__/ { print NR + 1; exit 0; }' "$src")
[ $? -ne 0 ] && return 1
# Untar following archive
tail -n +$skip "$src" \
| tar -xj --no-same-owner -C "%{buildroot}/opt/%{name}"
[ ${PIPESTATUS[0]} -ne 0 -o ${PIPESTATUS[1]} -ne 0 ] && return 1
mkdir -p %{buildroot}%{_datadir}/{applications,pixmaps}
# create desktop files
echo -e '[Desktop Entry]\nName=Genymotion\nType=Application\nExec=/opt/genymotion/genymotion\nIcon=genymotion' > %{buildroot}%{_datadir}/applications/%{name}.desktop
# setup icons
install -Dm755 %{buildroot}/opt/%{name}/icons/%{name}-logo.png %{buildroot}%{_datadir}/pixmaps/%{name}.png
# DISABLE RPath Check
export NO_BRP_CHECK_RPATH=true
%files
/opt/genymotion/
%{_datadir}/applications/genymotion.desktop
%{_datadir}/pixmaps/genymotion.png
%changelog