17
0

Compare commits

5 Commits

2 changed files with 23 additions and 14 deletions

View File

@@ -1,3 +1,13 @@
-------------------------------------------------------------------
Mon Jun 9 09:38:54 UTC 2025 - Markéta Machová <mmachova@suse.com>
- Convert to libalternatives
-------------------------------------------------------------------
Fri May 30 09:31:46 UTC 2025 - Markéta Machová <mmachova@suse.com>
- Convert to pip-based build
-------------------------------------------------------------------
Mon May 25 06:50:31 UTC 2020 - Petr Gajdos <pgajdos@suse.com>

View File

@@ -1,7 +1,7 @@
#
# spec file for package python-kismetdb
#
# Copyright (c) 2020 SUSE LLC
# Copyright (c) 2025 SUSE LLC
# Copyright (c) 2019, Martin Hauke <mardnh@gmx.de>
#
# All modifications and additions to the file contributed by third parties
@@ -17,8 +17,9 @@
#
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
%define binaries kismet_log_devices_to_filebeat_json kismet_log_to_pcap kismet_log_to_csv kismet_log_devices_to_json kismet_log_to_kml
%bcond_without libalternatives
%define pkg_version 2019.5.5
Name: python-kismetdb
Version: 2019.05.05
Release: 0
@@ -26,13 +27,15 @@ Summary: A python wrapper for the Kismet database
License: GPL-2.0-only
URL: https://github.com/kismetwireless/python-kismet-db
Source: https://github.com/kismetwireless/python-kismet-db/archive/%{version}.tar.gz
BuildRequires: %{python_module pip}
BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module wheel}
BuildRequires: alts
BuildRequires: fdupes
BuildRequires: python-rpm-macros
Requires: alts
Requires: python-python-dateutil
Requires: python-simplekml
Requires(post): update-alternatives
Requires(postun): update-alternatives
BuildArch: noarch
%python_subpackages
@@ -43,10 +46,10 @@ Kismet database wrapper.
%setup -q -n python-kismet-db-%{version}
%build
%python_build
%pyproject_wheel
%install
%python_install
%pyproject_install
for b in %{binaries}; do
%python_clone -a %{buildroot}%{_bindir}/$b
done
@@ -56,14 +59,9 @@ done
# tests are disabled for now since those need a docker environment for testing
#%%pytest
%post
%pre
for b in %{binaries}; do
%python_install_alternative $b
done
%postun
for b in %{binaries}; do
%python_uninstall_alternative $b
%python_libalternatives_reset_alternative $b
done
%files %{python_files}
@@ -74,6 +72,7 @@ done
%python_alternative %{_bindir}/kismet_log_to_csv
%python_alternative %{_bindir}/kismet_log_to_pcap
%python_alternative %{_bindir}/kismet_log_devices_to_filebeat_json
%{python_sitelib}/*
%{python_sitelib}/kismetdb
%{python_sitelib}/kismetdb-%{pkg_version}*-info
%changelog