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