Name: waydroid-magisk-delta-apk Version: 26301 Release: 1 Summary: waydroid magisk delta apk License: LGPL URL: https://github.com/HuskyDG/magisk-files Source0: waydroid-magisk-delta-apk-%{version}.tar.gz BuildRequires: coreutils rpm_macro(_waydroidextradir) BuildArch: noarch Provides: waydroid(magisk.apk) %define appdir %{_datadir}/%{name} %define apprelease %{appdir}/app-release.apk #%define appdebug %{appdir}/app-debug.apk %description %{summary}. %prep %autosetup -p1 -n waydroid-magisk-delta-apk-%{version} %install mkdir -p '%{buildroot}%{appdir}/' mkdir -p '%{buildroot}%{_waydroidextradir}/' cp app-release.apk '%{buildroot}%{apprelease}' #cp app-debug.apk '%{buildroot}%{appdebug}' %post #!/bin/sh echo post install "$1" if [ "$1" == 1 ]; then %{_sbindir}/update-alternatives --install '%{_waydroidextradir}/magisk.apk' magisk.apk '%{apprelease}' 25 fi %postun #!/bin/sh echo post remove "$1" if [ "$1" == 0 ]; then %{_sbindir}/update-alternatives --remove magisk.apk '%{apprelease}' || : fi %files %dir %{appdir} %dir %{_waydroidextradir} %{apprelease} # # %package debug # License: GPL-3 # Summary: %{summary} # %description debug # %{summary}. # # # %post debug # #!/bin/sh # echo post install "$1" # if [ "$1" == 1 ]; then # %{_sbindir}/update-alternatives --install '%{_waydroidextradir}/magisk.apk' magisk.apk '%{appdebug}' 25 # fi # # %postun debug # #!/bin/sh # echo post remove "$1" # if [ "$1" == 0 ]; then # %{_sbindir}/update-alternatives --remove magisk.apk '%{appdebug}' || : # fi # # # %files debug # %dir %{_waydroidextradir} # %{appdebug}