File eg25-manager.spec of Package eg25-manager
#
# spec file for package eg25-manager
#
# Copyright (c) 2021 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: eg25-manager
Version: 0.4.3.0
Release: 0
Summary: Quectel EG25 management daemon
License: GPL-3.0-only
URL: https://gitlab.com/mobian1/devices/eg25-manager
Source0: %{name}-%{version}.tar.xz
Source1: eg25-manager.service
BuildRequires: meson
BuildRequires: gcc
BuildRequires: fdupes
BuildRequires: pkgconfig(libgpiod)
BuildRequires: pkgconfig(ModemManager)
BuildRequires: pkgconfig(glib-2.0)
BuildRequires: pkgconfig(gudev-1.0)
BuildRequires: pkgconfig(libusb-1.0)
BuildRequires: pkgconfig(libcurl)
%systemd_requires
%description
eg25-manager is a daemon for managing the Quectel EG25 modem
found on the Pine64 PinePhone.
It implements the following features:
* cleanly power on/off the modem
* configure/check essential parameters (such as the audio
format) on startup
* monitor the modem state through ModemManager
* put the modem in low-power mode when suspending the system,
and restore it back to normal behavior when resuming
* monitor the modem state on resume and recover it if needed
%prep
%autosetup -n %{name}-%{version}/
%build
%meson
%meson_build
%install
%meson_install
%{__install} -m 0644 -D -t %{buildroot}%{_unitdir} %{SOURCE1}
%fdupes -s %{buildroot}%{_prefix}
%pre
%service_add_pre eg25-manager.service
%post
%service_add_post eg25-manager.service
%preun
%service_del_preun eg25-manager.service
%postun
%service_del_postun eg25-manager.service
%files
%doc README.md
%license COPYING
%{_bindir}/eg25manager
%{_datadir}/eg25-manager/
%{_prefix}/lib/udev/rules.d/80-modem-eg25.rules
%{_unitdir}/*
%changelog