File android-studio.spec of Package android-studio

#
# spec file for package android-studio
#
# Copyright (c) 2020 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via https://bugs.opensuse.org/
#


Name:           android-studio
Version:        4.1.0.19
Release:        0
Summary:        Google Android IDE
License:        Apache-2.0
Group:          Development/Tools/IDE
URL:            https://developer.android.com/studio/
ExclusiveArch:  x86_64
Source0:        %{name}-%{version}.tar.xz
Source1:        %{name}-rpmlintrc
BuildRequires:  fdupes
BuildRequires:  update-desktop-files
Recommends:     java-sdk >= 1.8.0

%define install_dir /opt/google

%description
The official integrated development environment for building apps on every type of Android device.

%prep
%setup -q -n %{name}

%build

%install
%{__mkdir_p} %{buildroot}%{_bindir}
%{__mkdir_p} %{buildroot}%{_datadir}/pixmaps
%{__mkdir_p} %{buildroot}%{install_dir}
%{__cp} -a -t %{buildroot}%{install_dir} %{_builddir}/%{name}
%{__ln_s} %{install_dir}/%{name}/bin/studio.sh %{buildroot}%{_bindir}/%{name}
%{__cp} %{_builddir}/%{name}/bin/studio.png %{buildroot}%{_datadir}/pixmaps/%{name}.png
%suse_update_desktop_file -c %{name} "Android Studio" "%{summary}" %{name} %{name} Development IDE
%fdupes %{buildroot}%{install_dir}

%files
%defattr(-,root,root,-)
%{_bindir}/%{name}
%dir %{install_dir}
%{install_dir}/%{name}
%attr(644,root,root) %{_datadir}/pixmaps/%{name}.png
%attr(644,root,root) %{_datadir}/applications/%{name}.desktop

%changelog
openSUSE Build Service is sponsored by