18
1
Files
python-radexreader/python-radexreader.spec
Fabrice 2d0f925919 Accepting request 1091334 from home:luigifab:branches:devel:languages:python:numeric
- New upstream version (1.2.2)
  * fix detection of RADEX ONE v1 (ABBA/A011)
  * fix measure value (hexa:8 useless)

I hope all is good.
Not sure how to do with man pages (so disabled).

OBS-URL: https://build.opensuse.org/request/show/1091334
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:numeric/python-radexreader?expand=0&rev=7
2023-06-07 19:13:58 +00:00

86 lines
2.9 KiB
RPMSpec

#
# spec file for package python-radexreader
#
# Copyright (c) 2021-2023 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/
#
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-radexreader
Version: 1.2.2
Release: 0
Summary: Reader for the RADEX RD1212 and ONE Geiger counters
License: GPL-2.0-or-later
URL: https://github.com/luigifab/python-radexreader
Source0: %{url}/archive/v%{version}/%{name}-%{version}.tar.gz
BuildRequires: %{python_module pyserial}
BuildRequires: %{python_module pyusb}
BuildRequires: %{python_module setuptools}
BuildRequires: python-rpm-macros
BuildRequires: fdupes
Requires: python-pyserial
Requires: python-pyusb
Requires(post): update-alternatives
Requires(postun): update-alternatives
BuildArch: noarch
%python_subpackages
%description
The RadexReader is an user-space driver for the RADEX RD1212 and
the RADEX ONE Geiger counters. It allow to read and clear stored
data via USB.
To avoid Access denied (insufficient permissions), don't forget
to unplug the device after installation.
%prep
%setup -q -n python-radexreader-%{version}
sed -i 's/python3-radexreader /python3-radexreader-rpm /g' src/radexreader.py
sed -i 's/\#\!\/usr\/bin\/python3/\#/g' src/radexreader/__init__.py
%build
cd src
%python_build
%install
cd src
%python_install
%python_expand %fdupes %{buildroot}%{$python_sitelib}
mkdir -p %{buildroot}%{_bindir}/
mkdir -p %{buildroot}%{_udevrulesdir}/
#mkdir -p %{buildroot}%{_mandir}/man1/ %{buildroot}%{_mandir}/fr/man1/
%python_expand install -p -m 644 ../debian/udev %{buildroot}%{_udevrulesdir}/60-python%{$python_bin_suffix}-radexreader.rules
#install -p -m 644 ../debian/radexreader.1 %{buildroot}%{_mandir}/man1/radexreader.1
#install -p -m 644 ../debian/radexreader.fr.1 %{buildroot}%{_mandir}/fr/man1/radexreader.1
install -p -m 755 ../src/radexreader.py %{buildroot}%{_bindir}/radexreader
%python_clone -a %{buildroot}%{_bindir}/radexreader
%files %{python_files}
#%{_mandir}/man1/radexreader.1*
#%{_mandir}/*/man1/radexreader.1*
%license LICENSE
%doc README.md
%python_alternative %{_bindir}/radexreader
%{python_sitelib}/radexreader/
%{python_sitelib}/radexreader*egg-info/
%{_udevrulesdir}/60-python%{python_bin_suffix}-radexreader.rules
%post
%python_install_alternative radexreader
%postun
%python_uninstall_alternative radexreader
%changelog