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 20.0
Version: 20250809
Release: 0
Summary: Waydroid is a container-based approach to boot a full Android
License: LGPL-3.0-only
URL: https://sourceforge.net/projects/waydroid/files/images
%define wsystem() Source%{1}: %{url}/system/lineage/waydroid_%{2}/lineage-%{bignum}-%{version}-VANILLA-waydroid_%{2}-system.zip
%define wvendor() Source%{1}: %{url}/vendor/waydroid_%{2}/lineage-%{bignum}-%{version}-MAINLINE-waydroid_%{2}-vendor.zip
%wsystem 0 x86_64
%wvendor 1 x86_64
%wsystem 2 x86
%wvendor 3 x86
%wsystem 4 arm64
%wvendor 5 arm64
%wsystem 6 arm
%wvendor 7 arm
NoSource: 1
NoSource: 2
NoSource: 3
NoSource: 4
NoSource: 5
NoSource: 6
NoSource: 7
Nosource: 0
BuildRequires: unzip
Requires: waydroid
Requires: %{name}-vendor = %{version}-%{release}
Requires: %{name}-system = %{version}-%{release}
%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: aarch64 armv6l armv7l i486 i686 i586 ix86 x86_64 %{?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