File universal-android-debloater.spec of Package universal-android-debloater

#
# spec file for package universal-android-debloater
#
# Copyright (c) 2024 mantarimay
#
# 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/
#


%bcond_with test
Name:           universal-android-debloater
Version:        1.1.1
Release:        0
Summary:        A tool to debloat non-rooted Android devices using ADB
License:        GPL-3.0-or-later
URL:            https://github.com/Universal-Debloater-Alliance/universal-android-debloater-next-generation
Source0:        %{url}/archive/%{version}/%{name}-next-generation-%{version}.tar.gz
Source1:        vendor.tar.zst
Source2:        uad-ng.desktop 
BuildRequires:  cargo-packaging
BuildRequires:  desktop-file-utils
BuildRequires:  hicolor-icon-theme
Requires:       android-tools

%description
UAD-ng can remove system apps, it cannot detect or remove potentially
malicious system services or drivers baked into the firmware of your
device by various vendors; some vendor-specific apps are only UI front-
ends to vendor-provided system services, and as such disabling/
uninstalling those apps will not stop a service from running.

DISCLAIMER: Use at your own risk. We're not responsible for anything
that could happen to your phone.

%prep
%autosetup -n %{name}-next-generation-%{version} -a1 -p1

%build
%{cargo_build} --no-default-features --features wgpu,no-self-update

%install
install -Dm755 target/release/uad-ng -t %{buildroot}%{_bindir}
install -Dm644 %{SOURCE2} -t %{buildroot}%{_datadir}/applications
install -Dm644 resources/assets/logo-dark.png \
    %{buildroot}%{_datadir}/icons/hicolor/512x512/apps/uad-ng.png

%check
%if %{with test}
%{cargo_test}
%endif

desktop-file-validate %{buildroot}%{_datadir}/applications/*.desktop

%files
%license LICEN*
%doc README*
%{_bindir}/uad-ng
%{_datadir}/icons/hicolor/512x512/apps/uad-ng.png
%{_datadir}/applications

%changelog
openSUSE Build Service is sponsored by