brickv/brickv.spec
Frank Kunz 079b9650ba Accepting request 1061063 from home:frank_kunz:branches:electronics
- Update to new upstream version 2.4.23
  - Allow saving config when Modbus master timeout is changed for RS485 Bricklet
  - Enable Python development mode when running from source
  - Fix socket leak on connect error
  - Add manual y-axis scaling for plot widget
  - Remove all driver files for Windows 7 and earlier
  - Fix calibration dialog title for Compass Bricklet plugin
  - Fix Galileo satellite numbers for GPS Bricklet 3.0
  - Add support for IPv6 connections
  - Add commandline options to specify host, port and secret
  - Add tab select menu that stays in the top left corner
  - Fix corner cases in IMU Brick(let) plugin untab handling
  - Add manual firmware list update button if auto-search for updates is disabled

OBS-URL: https://build.opensuse.org/request/show/1061063
OBS-URL: https://build.opensuse.org/package/show/electronics/brickv?expand=0&rev=27
2023-01-25 22:07:28 +00:00

82 lines
2.8 KiB
RPMSpec

#
# spec file for package brickv
#
# Copyright (c) 2023 SUSE LLC
# Copyright (c) 2019 Frank Kunz
#
# 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: brickv
Version: 2.4.23
Release: 0
Summary: Tinkerforge Brick Viewer
License: GPL-2.0-only
Group: Development/Tools/Debuggers
URL: http://www.tinkerforge.com
Source0: https://github.com/Tinkerforge/brickv/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
BuildRequires: %{python_module qt5}
BuildRequires: %{python_module setuptools}
BuildRequires: fdupes
BuildRequires: iso-codes
BuildRequires: mobile-broadband-provider-info
BuildRequires: python-rpm-macros
BuildRequires: python3
BuildRequires: update-desktop-files
Requires: python3-pytz
Requires: python3-qt5
Requires: python3-serial
Requires: python3-tzlocal
BuildArch: noarch
%description
Small Qt GUI to control and test all Bricks and Bricklets from Tinkerforge.
%prep
%setup -q
# remove unneeded shebangs
sed -i 's|#!/usr/bin/env python3||g' src/brickv/main.py
sed -i 's|#!/usr/bin/env python3||g' src/brickv/plugin_system/plugins/red/build_serviceproviders.py
%build
export SERVICEPROVIDERS_XML_PATH=/usr/share/mobile-broadband-provider-info/serviceproviders.xml
export ISOCODES_JSON_PATH=/usr/share/iso-codes/json/iso_3166-1.json
# force UTF-8 for build scripts
export LANG=C.UTF-8
pushd src
python3 build_src.py
# remove no more needed build scripts
rm -f build_src.py brickv/plugin_system/plugins/red/build_extra.py brickv/plugin_system/plugins/red/build_scripts.py
popd
%install
pushd src
python3 setup.py install --root=%{buildroot} --prefix=/usr
install -m 644 -D -t %{buildroot}%{_udevrulesdir} build_data/linux/%{name}/lib/udev/rules.d/99-tinkerforge-brickv.rules
install -m 644 -D -t %{buildroot}/usr/share/pixmaps build_data/linux/%{name}/usr/share/pixmaps/brickv-icon.png
install -m 644 -D -t %{buildroot}/usr/share/applications build_data/linux/%{name}/usr/share/applications/%{name}.desktop
popd
%fdupes -s %{buildroot}%{python3_sitelib}/brickv/
%suse_update_desktop_file -r %{name} Development Debugger
%files -n %{name}
%doc src/changelog README.rst
%license license.txt
%{_bindir}/%{name}
%{python3_sitelib}/brickv*
%{_udevrulesdir}/*.rules
/usr/share/pixmaps/*
/usr/share/applications/*
%changelog