commit 888824497d6df61138a49ed1db27036ddb196fa6
Author: Jose Ignacio Tornos Martinez <jtornosm(a)redhat.com>
Date: Wed Jul 10 14:37:15 2024 +0200
Initial version of the package
.gitignore | 1 +
palcom-wwan-fcc-unlock.spec | 78 +++++++++++++++++++++++++++++++++++++++++++++
sources | 1 +
3 files changed, 80 insertions(+)
---
diff --git a/.gitignore b/.gitignore
index e69de29..5487af6 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/palcom-wwan-fcc-unlock-3.1.1.tar.gz
diff --git a/palcom-wwan-fcc-unlock.spec b/palcom-wwan-fcc-unlock.spec
new file mode 100644
index 0000000..329802c
--- /dev/null
+++ b/palcom-wwan-fcc-unlock.spec
@@ -0,0 +1,78 @@
+%bcond build 0
+
+%if %{without build}
+%global __strip /bin/true
+%endif
+%global debug_package %{nil}
+
+Name: palcom-wwan-fcc-unlock
+Version: 3.1.1
+Release: 1%{?dist}
+Summary: FCC unlocking service for Palcom modems
+
+License: BSD-3-Clause
+URL:
https://github.com/palcomwireless/linux_pkgs
+Source0: %{url}/archive/%{version}/%{name}-%{version}.tar.gz
+ExclusiveArch: x86_64
+
+%if %{with build}
+BuildRequires: cmake gcc g++ glib2-devel
+BuildRequires: openssl-libs libmbim-devel
+%endif
+BuildRequires: chrpath
+Requires: ModemManager dmidecode usbutils openssl
+Requires: policycoreutils
+
+%description
+FCC unlocking service for Palcom modems to be used by ModemManager.
+For the detail capable WWAN modules, please refer the GitHub project.
+
+
+%prep
+%setup -q -n linux_pkgs-%{version}
+
+
+%if %{with build}
+%build
+%cmake -DCMAKE_POSITION_INDEPENDENT_CODE=ON \
+ --no-warn-unused-cli
+%cmake_build
+%endif
+
+
+%install
+sh deb_extra/install >/dev/null 2>&1
+mkdir -p %{buildroot}%{_sbindir}
+cp build/release/dpkg/opt/pwl/pwl-unlock/pwl_unlock %{buildroot}%{_sbindir}
+chrpath --delete %{buildroot}%{_sbindir}/*
+chmod a+x %{buildroot}%{_sbindir}/*
+mkdir -p %{buildroot}%{_libdir}/ModemManager/fcc-unlock.d
+cp build/release/dpkg/opt/pwl/pwl-unlock/fcc-unlock.d/*
%{buildroot}%{_libdir}/ModemManager/fcc-unlock.d
+sed -i 's@/opt/pwl/pwl-unlock/pwl_unlock@pwl_unlock@g'
%{buildroot}%{_libdir}/ModemManager/fcc-unlock.d/*
+chmod a+x %{buildroot}%{_libdir}/ModemManager/fcc-unlock.d/*
+mkdir -p %{buildroot}%{_datadir}/selinux/packages
+cp deb_extra/modemmanager_fccunlock.cil %{buildroot}%{_datadir}/selinux/packages
+
+
+%post
+%selinux_modules_install %{_datadir}/selinux/packages/modemmanager_fccunlock.cil
+
+
+%postun
+if [ $1 -eq 0 ]; then
+ %selinux_modules_uninstall modemmanager_fccunlock
+fi
+
+
+%files
+%{_sbindir}/pwl_unlock
+%dir %{_libdir}/ModemManager/fcc-unlock.d
+%{_libdir}/ModemManager/fcc-unlock.d/413c:8217
+%{_libdir}/ModemManager/fcc-unlock.d/413c:8218
+%{_libdir}/ModemManager/fcc-unlock.d/413c:8219
+%{_datadir}/selinux/packages/modemmanager_fccunlock.cil
+
+
+%changelog
+* Fri Jun 14 2024 Jose Ignacio Tornos Martinez <jtornosm(a)redhat.com> - 3.1.1-1
+- Initial version of the package
diff --git a/sources b/sources
index e69de29..7cb1539 100644
--- a/sources
+++ b/sources
@@ -0,0 +1 @@
+SHA512 (palcom-wwan-fcc-unlock-3.1.1.tar.gz) =
ae5a64cd5ff3eb6b81f7eaeacb7586605508119a8c458b2eac62e4266a9a7b7ced69fc7c594cfbf2565d4b538f5aa7165d34930c3ede7a76af7e7dc140314458