File waydroid-image.spec of Package waydroid-image
#
# spec file for package waydroid-image
#
# Copyright (c) 2021 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: waydroid-image
%define bignum 18.1
Version: 20240427
Release: 0
Summary: Waydroid is a container-based approach to boot a full Android
License: LGPL-3.0-only
URL: https://github.com/waydroid/android_vendor_waydroid
Source0: https://sourceforge.net/projects/waydroid/files/images/system/lineage/waydroid_x86_64/lineage-%{bignum}-%{version}-VANILLA-waydroid_x86_64-system.zip
Source1: https://sourceforge.net/projects/waydroid/files/images/vendor/waydroid_x86_64/lineage-%{bignum}-%{version}-MAINLINE-waydroid_x86_64-vendor.zip
Source2: https://sourceforge.net/projects/waydroid/files/images/system/lineage/waydroid_x86/lineage-%{bignum}-%{version}-VANILLA-waydroid_x86-system.zip
Source3: https://sourceforge.net/projects/waydroid/files/images/vendor/waydroid_x86/lineage-%{bignum}-%{version}-MAINLINE-waydroid_x86-vendor.zip
Source4: https://sourceforge.net/projects/waydroid/files/images/system/lineage/waydroid_arm64/lineage-%{bignum}-%{version}-VANILLA-waydroid_arm64-system.zip
Source5: https://sourceforge.net/projects/waydroid/files/images/vendor/waydroid_arm64/lineage-%{bignum}-%{version}-MAINLINE-waydroid_arm64-vendor.zip
Source6: https://sourceforge.net/projects/waydroid/files/images/system/lineage/waydroid_arm/lineage-%{bignum}-%{version}-VANILLA-waydroid_arm-system.zip
Source7: https://sourceforge.net/projects/waydroid/files/images/vendor/waydroid_arm/lineage-%{bignum}-%{version}-MAINLINE-waydroid_arm-vendor.zip
BuildRequires: unzip
Requires: waydroid
Requires: %{name}-vendor
Requires: %{name}-system
%package vendor
Summary: %{summary}
Provides: waydroid(images/vendor.img)
%description vendor
Waydroid is a container-based approach to boot a full Android system on a regular GNU/Linux system like openSUSE.
%package system
Summary: %{summary}
Provides: waydroid(images/system.img)
%description system
Waydroid is a container-based approach to boot a full Android system on a regular GNU/Linux system like openSUSE.
%description
Waydroid is a container-based approach to boot a full Android system on a regular GNU/Linux system like openSUSE.
%{!?x86_64:%define x86_64 x86_64}
%{!?ix86:%define ix86 i586 i686 i486}
%{!?arm64:%define arm64 aarch64}
%{!?arm:%define arm armv6l armv7l}
ExclusiveArch: %{?x86_64} %{?ix86} %{?arm64} %{?arm}
%ifarch %{x86_64}
%define wayarch x86_66
%define sys 0
%define ven 1
%elifarch %{ix86}
%define wayarch x86
%define sys 2
%define ven 3
%elifarch %{arm64}
%define wayarch arm64
%define sys 4
%define ven 5
%elifarch %{arm}
%define wayarch arm
%define sys 6
%define ven 7
%endif
%prep
%setup -q -c -T -a %{sys} -a %{ven}
%install
%{__install} -dm755 %{buildroot}%{_datadir}/waydroid-extra/images
mv system.img %{buildroot}%{_datadir}/waydroid-extra/images
mv vendor.img %{buildroot}%{_datadir}/waydroid-extra/images
%files system
%dir %{_datadir}/waydroid-extra
%dir %{_datadir}/waydroid-extra/images
%{_datadir}/waydroid-extra/images/system.img
%files vendor
%dir %{_datadir}/waydroid-extra
%dir %{_datadir}/waydroid-extra/images
%{_datadir}/waydroid-extra/images/vendor.img
%files
%changelog