Name: pp-audio-switch Version: 0.1 Release: 1%{?dist} Summary: Pinephone call audio routing for megis kernel License: GPLv3+ URL: https://gitlab.com/fedora-mobile/%{name} Source0: callaudio.sh Source1: pineaudio.c Source2: pinephone-calls.service BuildRequires: gcc BuildRequires: systemd-rpm-macros Requires: bash #Requires: megi-kernel >= 5.10.3 #Requires: iio-sensor-proxy %description Listen for new calls to automatically configure audio routing when detected. %global debug_package %{nil} %build gcc %{SOURCE1} -o pineaudio chmod +x pineaudio %install mkdir -p $RPM_BUILD_ROOT/usr/bin cp pineaudio $RPM_BUILD_ROOT/usr/bin cp %{SOURCE0} $RPM_BUILD_ROOT/usr/bin mkdir -p $RPM_BUILD_ROOT/etc/systemd/system cp %{SOURCE2} $RPM_BUILD_ROOT/etc/systemd/system %post %systemd_post pinephone-calls.service systemctl enable pinephone-calls.service %preun %systemd_preun pinephone-calls.service %postun %systemd_postun_with_restart pinephone-calls.service %files %{_bindir}/callaudio.sh %{_bindir}/pineaudio %{_sysconfdir}/systemd/system/pinephone-calls.service %changelog * Mon Nov 15 2021 Yoda - 0.1-1 - Initial packaging