File appimagelauncher.spec of Package appimagelauncher
%global debug_package %{nil}
Name: appimagelauncher
Version: 2.2.0
Release: 1%{?dist}
Summary: Helper application for Linux distributions serving as a kind of "entry point" for running and integrating AppImages
License: MIT
URL: https://github.com/TheAssassin/AppImageLauncher
# This is so so so so so so bad
%ifarch aarch64
Source0: https://repos.fyralabs.com/terra39/appimagelauncher-0:2.2.0-1.fc39.aarch64.rpm
Source1: https://repos.fyralabs.com/terrarawhide/libappimageupdate-0:2.0.0~alpha~1~20220304.git0b20011-2.fcrawhide.aarch64.rpm
%endif
%ifarch x86_64
Source0: https://repos.fyralabs.com/terra39/appimagelauncher-0:2.2.0-1.fc39.x86_64.rpm
Source1: https://repos.fyralabs.com/terrarawhide/libappimageupdate-0:2.0.0~alpha~1~20220304.git0b20011-2.fcrawhide.x86_64.rpm
%endif
%description
%{summary}.
%prep
%setup -Tc
%build
rpm2cpio %{_sourcedir}/appimagelauncher-0:2.2.0-1.fc39.%{_arch}.rpm | cpio -idmv
rpm2cpio %{_sourcedir}/libappimageupdate-0:2.0.0~alpha~1~20220304.git0b20011-2.fcrawhide.%{_arch}.rpm | cpio -idmv
%install
rm -rf usr/lib/.build-id
mkdir -p %{buildroot}/usr/
cp -r usr/* %{buildroot}/usr/
%post
echo "Installing AppImageLauncher as interpreter for AppImages"
# as there's no _real_ package that we could use as a dependency to take care of the kernel module,
# we need to make sure that the kernel module is loaded manually
modprobe -v binfmt_misc
(set -x; systemctl restart systemd-binfmt)
%postun
echo "Removing AppImageLauncher as interpreter for AppImages"
(set -x; systemctl restart systemd-binfmt)
update_notifier="/usr/share/update-notifier/notify-reboot-required"
if [ -x "$update_notifier" ]; then
"$update_notifier"
fi
%files
%{_datadir}/appimagelauncher
%{_datadir}/applications/appimagelauncher.desktop
%{_datadir}/applications/appimagelaunchersettings.desktop
%{_bindir}/AppImageLauncher
%{_bindir}/AppImageLauncherSettings
%{_bindir}/appimagelauncherd
%{_bindir}/ail-cli
%{_prefix}/lib/binfmt.d/appimage.conf
%{_datadir}/icons/
%{_libdir}/appimagelauncher
%{_libdir}/libappimageupdate-qt.so
%{_libdir}/libappimageupdate-qt_static.a
%{_libdir}/libappimageupdate.a
%{_libdir}/libappimageupdate.so
%{_userunitdir}/appimagelauncherd.service
%{_datadir}/mime/packages/appimage.xml
%{_mandir}/man1/AppImageLauncher.1.gz
%changelog