From 136b5ca53e5f2f15d132542f2deee3305a0c47e409caff7bf6c7d4c72063ea54 Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Mon, 22 Nov 2021 15:00:29 +0000 Subject: [PATCH] - BuildRequires on a binary library package is a bad idea as well as the required SOVER needs to be calculated. OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-libevdev?expand=0&rev=2 --- python-libevdev.changes | 7 ++++++- python-libevdev.spec | 14 +++++++------- 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/python-libevdev.changes b/python-libevdev.changes index de078b6..beb015a 100644 --- a/python-libevdev.changes +++ b/python-libevdev.changes @@ -1,5 +1,10 @@ +------------------------------------------------------------------- +Mon Nov 22 14:59:29 UTC 2021 - Matej Cepl + +- BuildRequires on a binary library package is a bad idea as well + as the required SOVER needs to be calculated. + ------------------------------------------------------------------- Fri Nov 19 09:14:29 UTC 2021 - Callum Farmer - initial packaging required by libwacom (bsc#1192852) - diff --git a/python-libevdev.spec b/python-libevdev.spec index 51d8387..65892a6 100644 --- a/python-libevdev.spec +++ b/python-libevdev.spec @@ -1,5 +1,5 @@ # -# spec file for package python-libevdev +# spec file # # Copyright (c) 2021 SUSE LLC # @@ -19,7 +19,6 @@ %{?!python_module:%define python_module() python-%{**} python3-%{**}} %define skip_python2 1 %global modname libevdev -%define libevdev_sover 2 %define libevdev_reqver 1.6.0 Name: python-%{modname} Version: 0.9 @@ -29,13 +28,14 @@ License: MIT Group: Development/Libraries/Python URL: https://python-libevdev.readthedocs.io/ Source0: https://gitlab.freedesktop.org/libevdev/%{name}/-/archive/%{version}/%{name}-%{version}.tar.bz2 -BuildArch: noarch -BuildRequires: %{python_module setuptools} BuildRequires: %{python_module pytest} -BuildRequires: python-rpm-macros +BuildRequires: %{python_module setuptools} BuildRequires: fdupes -BuildRequires: libevdev%{libevdev_sover} >= %{libevdev_reqver} -Requires: libevdev%{libevdev_sover} >= %{libevdev_reqver} +BuildRequires: libevdev-devel >= %{libevdev_reqver} +BuildRequires: python-rpm-macros +%define libmodule %(rpm -q --qf "%%{name}" -f $(readlink -f %{_libdir}/libevdev.so)) +Requires: %{libmodule} >= %{libevdev_reqver} +BuildArch: noarch %python_subpackages %description