File pocof1beryllium-helpers.spec of Package pocof1beryllium-helpers
#
# spec file for package mobile-helpers
#
# Copyright (c) 2022 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: pocof1beryllium-helpers
Version: 0.5.3
Release: 1%{?dist}
Summary: Necessary Pocophone F1 files
License: GPL-2.0-only AND GPL-3.0-or-later
URL: https://gitlab.com/slem.os/%{name}
Source0: repomd.xml.key
Source3: mobile-helpers-boot.service
Source4: mobile-helpers-start.sh
Source5: sdm845-setup.service
Source6: sdm845-setup
Source7: 71-pocof1beryllium.rules
Source9: quick-suspend-resume.conf
Source10: 10-pocof1beryllium-dracut.conf
Source19: config.toml
Source12: opensuse-profile.sh
Source13: 99-automount-sd.rules
Source14: UPower.conf
Source15: q6voiced.conf
Source18: greetd
Source21: opensuse-background.png
Source26: menuback.png
Source27: lockscreen.png
Source23: 90-feedbackd-spmi.rules
Source25: opensuse-plamo-gtk-theme.sh
Source28: gtk.css
Source29: 90-modem-manager.rules
Source30: 90-wifi-hotspot.rules
Source31: 99-flashlight.rules
BuildRequires: alsa
BuildRequires: pam
BuildRequires: systemd-rpm-macros
BuildRequires: ModemManager
BuildRequires: upower
BuildRequires: dracut
#Requirements for Wifi, Modem and GPU
Requires: pd-mapper
Requires: qrtr
Requires: libqrtr1
Requires: tqftpserv
Requires: q6voiced
Requires: libtinyalsa2
Requires: tinyalsa
Requires: alsa-ucm-conf-sdm845
Requires: rmtfs
Requires: ModemManager >= 1.18.10
#General requirements
Requires: plymouth
Requires: plymouth-branding-openSUSE
Requires: python3-pyserial
Requires: python3-requests
Requires: upower
#Require the openSUSE logos
Requires: distribution-logos-openSUSE
Requires: distribution-logos-openSUSE-icons
Recommends: geoclue2
Suggests: avahi
Requires: pulseaudio >= 14.0
#Requires: ((pulseaudio >= 14.0) or (pipewire-pulseaudio and pipewire-alsa))
Conflicts: tlp
BuildArch: noarch
%description
Shell independent setup helpers for the PinePhone.
Includes configuration scripts for proper modem
initialization and system setup.
%package -n plasma-helpers
Summary: Plasma Mobile scripts
Requires: ModemManager
Conflicts: ofono
Requires: greetd
#work around sddm getting recommended in Plasma and replacing greetd
Conflicts: sddm
%description -n plasma-helpers
%{summary}.
%prep
%build
%install
%{__install} -Dm0644 -t %{buildroot}%{_datadir}/mobile-helpers %{SOURCE0} %{SOURCE19} %{SOURCE28} %{SOURCE14}
%{__install} -Dm0644 -t %{buildroot}%{_unitdir} %{SOURCE3} %{SOURCE5}
%{__install} -Dm0644 -t %{buildroot}%{_sysconfdir}/profile.d/ %{SOURCE12} %{SOURCE25}
%{__install} -Dm0744 -t %{buildroot}%{_bindir} %{SOURCE4} %{SOURCE6}
%{__install} -Dm0644 -t %{buildroot}%{_sysconfdir}/pam.d/ %{SOURCE18}
%{__install} -Dm0644 -t %{buildroot}%{_datadir}/wallpapers/ %{SOURCE21} %{SOURCE26} %{SOURCE27}
%{__install} -Dm0644 -t %{buildroot}%{_udevrulesdir} %{SOURCE23}
%{__install} -Dm0644 -t %{buildroot}%{_udevrulesdir} %{SOURCE31}
%{__install} -Dm0644 -t %{buildroot}%{_datadir}/polkit-1/rules.d/01-org.freedesktop.ModemManager.rules %{SOURCE29}
%{__install} -Dm0644 -t %{buildroot}%{_datadir}/polkit-1/rules.d/ %{SOURCE30}
%{__install} -Dm0644 -t %{buildroot}%{_unitdir}/ModemManager.service.d/ %{SOURCE9}
%{__install} -Dm0644 -t %{buildroot}%{_udevrulesdir} %{SOURCE7}
%{__install} -Dm0644 -t %{buildroot}%{_sysconfdir}/dracut.conf.d/ %{SOURCE10}
%{__install} -Dm0644 -t %{buildroot}%{_sysconfdir}/ %{SOURCE15}
%pre -n %{name}
%service_add_pre mobile-helpers-boot.service
%post -n %{name}
%service_add_post mobile-helpers-boot.service
%preun -n %{name}
%service_del_preun mobile-helpers-boot.service
%postun -n %{name}
%service_del_postun_without_restart mobile-helpers-boot.service
%files
%attr(0755,root,root) %dir %{_datadir}/mobile-helpers/
%attr(0644,root,root) %{_datadir}/mobile-helpers/{config.toml,repomd.xml.key,gtk.css,UPower.conf}
%config %{_sysconfdir}/pam.d/*
%config %{_sysconfdir}/profile.d/opensuse-profile.sh
%config %{_sysconfdir}/q6voiced.conf
%{_unitdir}/*
%{_bindir}/*
%{_udevrulesdir}/*
%{_datadir}/wallpapers/
%{_sysconfdir}/dracut.conf.d/
%files -n plasma-helpers
%config %{_sysconfdir}/profile.d/opensuse-plamo-gtk-theme.sh
%dir %{_datadir}/polkit-1
%dir %{_datadir}/polkit-1/rules.d/
%{_datadir}/polkit-1/rules.d/*
%changelog