host/contrib/simtrace2.spec.in: update

Apply various improvements from Martin Hauke, thanks!

* Put sover into a variable
* Sync BuildRequires with configure.ac
* Update libosmo-simtrace2 summary
* Use %make_build instead of make %{?_smp_mflags}

Change-Id: I35ce3865702f72365b38b0eaa8b28f332dabcd1f
This commit is contained in:
Oliver Smith 2021-12-10 14:16:41 +01:00
parent afd23660b3
commit 8dada9b454
1 changed files with 16 additions and 14 deletions

View File

@ -1,7 +1,8 @@
#
# spec file for package simtrace2
#
# Copyright (c) 2018, Martin Hauke <mardnh@gmx.de>
# Copyright (c) 2021 SUSE LLC
# Copyright (c) 2018-2021, Martin Hauke <mardnh@gmx.de>
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@ -12,6 +13,7 @@
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
%define sover 1
Name: simtrace2
Version: @VERSION@
Release: 0
@ -24,12 +26,11 @@ BuildRequires: autoconf
BuildRequires: automake
BuildRequires: libtool
BuildRequires: pkgconfig
BuildRequires: pkgconfig(libosmocore)
BuildRequires: pkgconfig(libosmosim)
BuildRequires: pkgconfig(libosmocore) >= 1.4.0
BuildRequires: pkgconfig(libosmosim) >= 1.4.0
BuildRequires: pkgconfig(libosmousb) >= 1.4.0
BuildRequires: pkgconfig(libpcsclite)
BuildRequires: pkgconfig(libusb-1.0)
BuildRequires: pkgconfig(libosmousb) >= 0.0.0
BuildRequires: pkgconfig(udev)
%description
Osmocom SIMtrace 2 is a software and hardware system for passively
@ -38,11 +39,11 @@ and remote SIM operation.
This package contains SIMtrace 2 host utility.
%package -n libosmo-simtrace2-1
Summary: Shared Library part of libosmo-simtrace2
%package -n libosmo-simtrace2-%{sover}
Summary: Driver functions for Osmocom SIMtrace2 and compatible firmware
Group: System/Libraries
%description -n libosmo-simtrace2-1
%description -n libosmo-simtrace2-%{sover}
This library contains core "driver" functionality to interface with the
Osmocom SIMtrace2 (and compatible) USB device firmware. It enables
applications to implement SIM card / smart card tracing as well as
@ -51,7 +52,7 @@ SIM / smart card emulation functions.
%package -n libosmo-simtrace2-devel
Summary: Development files for the Osmocom SIMtrace2 library
Group: Development/Libraries/C and C++
Requires: libosmo-simtrace2-1 = %{version}
Requires: libosmo-simtrace2-%{sover} = %{version}
%description -n libosmo-simtrace2-devel
Osmocom SIMtrace2 (and compatible) USB device firmware. It enables
@ -69,17 +70,18 @@ cd host
echo "%{version}" >.tarball-version
autoreconf -fiv
%configure --disable-static
make %{?_smp_mflags}
%make_build
%install
%make_install -C host
install -Dm0644 host/contrib/99-simtrace2.rules %{buildroot}/%{_udevrulesdir}/99-simtrace2.rules
find %{buildroot} -type f -name "*.la" -delete -print
%post -n libosmo-simtrace2-1 -p /sbin/ldconfig
%postun -n libosmo-simtrace2-1 -p /sbin/ldconfig
%post -n libosmo-simtrace2-%{sover} -p /sbin/ldconfig
%postun -n libosmo-simtrace2-%{sover} -p /sbin/ldconfig
%files
%license host/COPYING
%doc README.md
%{_bindir}/simtrace2-cardem-pcsc
%{_bindir}/simtrace2-list
@ -87,8 +89,8 @@ find %{buildroot} -type f -name "*.la" -delete -print
%{_bindir}/simtrace2-tool
%{_udevrulesdir}/99-simtrace2.rules
%files -n libosmo-simtrace2-1
%{_libdir}/libosmo-simtrace2.so.1*
%files -n libosmo-simtrace2-%{sover}
%{_libdir}/libosmo-simtrace2.so.%{sover}*
%files -n libosmo-simtrace2-devel
%dir %{_includedir}/osmocom/