File pinephone-helpers.spec of Package pinephone-helpers
#
# spec file for package pinephone-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: pinephone-helpers
Version: 0.5.1
Release: 1%{?dist}
Summary: Necessary PinePhone files
License: GPL-2.0-only AND GPL-3.0-or-later
URL: https://gitlab.com/slem.os/%{name}
Source0: HiFi.conf
Source1: VoiceCall.conf
Source2: PinePhone.conf
Source8: repomd.xml.key
Source19: config.toml
Source3: pinephone-boot.service
Source5: pinephone-modem-boot.service
Source10: pinephone-gps.service
Source12: opensuse-profile.sh
Source9: device-hook
Source4: pp-start.sh
Source6: eg25_setup.sh
Source18: greetd
Source21: opensuse-background.png
Source26: menuback.png
Source27: lockscreen.png
Source7: 90-modem-eg25.rules
Source13: 99-automount-sd.rules
Source20: 10-proximity.rules
Source23: 20-pinephone-led.rules
Source24: 90-pinephone.conf
Source25: opensuse-plamo-gtk-theme.sh
Source28: gtk.css
Source29: 90-modem-manager.rules
Source30: 90-wifi-hotspot.rules
BuildRequires: alsa
BuildRequires: pam
BuildRequires: systemd-rpm-macros
Requires: atinout
Requires: eg25-manager
Requires: gpsd
Requires: iio-sensor-proxy
Requires: plymouth
Requires: python3-pyserial
Requires: python3-requests
#Require the openSUSE logos
Requires: distribution-logos-openSUSE
Requires: distribution-logos-openSUSE-icons
Recommends: geoclue2
Suggests: avahi
# Requires: pulseaudio >= 14.0
Requires: (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}/alsa/ucm2/PinePhone/ %{SOURCE0} %{SOURCE1} %{SOURCE2}
%{__install} -Dm0644 -t %{buildroot}%{_datadir}/pp-helpers %{SOURCE8} %{SOURCE19} %{SOURCE28}
%{__install} -Dm0644 -t %{buildroot}%{_unitdir} %{SOURCE3} %{SOURCE5} %{SOURCE10}
%{__install} -Dm0644 -t %{buildroot}%{_sysconfdir}/profile.d/ %{SOURCE12} %{SOURCE25}
%{__install} -Dm0755 -t %{buildroot}%{_sysconfdir}/gpsd/ %{SOURCE9}
%{__install} -Dm0744 -t %{buildroot}%{_bindir} %{SOURCE6} %{SOURCE4}
%{__install} -Dm0644 -t %{buildroot}%{_sysconfdir}/pam.d/ %{SOURCE18}
%{__install} -Dm0644 -t %{buildroot}%{_datadir}/wallpapers/ %{SOURCE21} %{SOURCE26} %{SOURCE27}
%{__install} -Dm0644 -t %{buildroot}%{_udevrulesdir} %{SOURCE7} %{SOURCE20} %{SOURCE23}
%{__install} -Dm0644 -t %{buildroot}%{_sysconfdir}/pulse/daemon.conf.d/ %{SOURCE24}
%{__install} -Dm0644 -t %{buildroot}%{_datadir}/polkit-1/rules.d/ %{SOURCE29} %{SOURCE30}
%pre -n %{name}
%service_add_pre pinephone-boot.service pinephone-gps.service pinephone-modem-boot.service
%post -n %{name}
%service_add_post pinephone-boot.service pinephone-gps.service pinephone-modem-boot.service
%preun -n %{name}
%service_del_preun pinephone-boot.service pinephone-gps.service pinephone-modem-boot.service
%postun -n %{name}
%service_del_postun_without_restart pinephone-boot.service pinephone-gps.service pinephone-modem-boot.service
%files
%attr(0755,root,root) %dir %{_datadir}/pp-helpers/
%attr(0644,root,root) %{_datadir}/pp-helpers/{config.toml,repomd.xml.key,gtk.css}
%config %{_sysconfdir}/pam.d/*
%config %{_sysconfdir}/profile.d/opensuse-profile.sh
%config %{_sysconfdir}/pulse/
%{_datadir}/alsa/ucm2/PinePhone/
%{_sysconfdir}/gpsd/
%{_bindir}/*
%{_unitdir}/*
%{_udevrulesdir}/*
%{_datadir}/wallpapers/
%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