File waydroid-magisk.spec of Package waydroid-magisk

#
# spec file for package waydroid-magisk
#
# Copyright (c) 2023 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-magisk
Version:        0.8.4
Release:        1
Summary:        Waydroid Magisk Package
License:        GPL-2.0-or-later
URL:            https://github.com/waydroid/magisk-module
Source0:        waydroid-magisk-0.8.4.tar.gz
BuildArch:      noarch
BuildRequires:  unzip
BuildRequires:  fdupes

%description
This package contains the Waydroid Magisk Module.

%prep
%setup -q -n %{name}-%{version}
#cp -r %{_sourcedir}/* %{_builddir}
mv magiskinstall.sh magiskinstall
mv magiskreset.sh magiskreset

%check

%build

%install
install -d %{buildroot}/usr/bin
install -d %{buildroot}/usr/share/waydroid-magisk
install -d %{buildroot}%{_docdir}/%{name}/
install -pm 644 README.md %{buildroot}%{_docdir}/%{name}/
install -pm 755 magiskinstall %{buildroot}/usr/bin/
install -pm 755 magiskreset %{buildroot}/usr/bin/
chmod +x %{buildroot}/usr/bin/magiskinstall
chmod +x %{buildroot}/usr/bin/magiskreset
%fdupes -s %{buildroot}/usr/share/waydroid-magisk/README.md
%fdupes -s %{buildroot}/usr/share/waydroid-magisk/LICENSE.txt

%post
echo For install magisk run magiskinstall
echo For removal or reset magisk run magiskreset

%files
%license LICENSE.txt
%doc README.md
%dir %attr(0755, root, root) "/usr/share/waydroid-magisk/"
%dir %attr(0755, root, root) "/usr/bin/"
%attr(0755, root, root) "/usr/bin/magiskinstall"
%attr(0755, root, root) "/usr/bin/magiskreset"

%changelog
openSUSE Build Service is sponsored by