From 54797c44ecd0e31d563736d9f2e9f744f310e979 Mon Sep 17 00:00:00 2001 From: Oliver Smith Date: Thu, 14 May 2020 11:52:23 +0200 Subject: [PATCH] contrib: integrate RPM spec Remove OpenSUSE bug report link, set version to @VERSION@, make it build with CentOS 8 etc. Related: OS#4550 Change-Id: Ib2da03980d99f12ab36ca5d5fdde92ddbefb040b --- .gitignore | 2 ++ configure.ac | 1 + .../{osmo-remsim.spec => osmo-remsim.spec.in} | 27 ++++++++++--------- 3 files changed, 17 insertions(+), 13 deletions(-) rename contrib/{osmo-remsim.spec => osmo-remsim.spec.in} (93%) diff --git a/.gitignore b/.gitignore index e2546a0..a1cec37 100644 --- a/.gitignore +++ b/.gitignore @@ -49,3 +49,5 @@ debian/autoreconf.* debian/.debhelper debian/debhelper* debian/files + +contrib/osmo-remsim.spec diff --git a/configure.ac b/configure.ac index b65340f..5833d0d 100644 --- a/configure.ac +++ b/configure.ac @@ -196,6 +196,7 @@ AC_OUTPUT( contrib/Makefile contrib/etc_default/Makefile contrib/systemd/Makefile + contrib/osmo-remsim.spec doc/Makefile doc/manuals/Makefile src/Makefile diff --git a/contrib/osmo-remsim.spec b/contrib/osmo-remsim.spec.in similarity index 93% rename from contrib/osmo-remsim.spec rename to contrib/osmo-remsim.spec.in index 84874bc..4ff26bc 100644 --- a/contrib/osmo-remsim.spec +++ b/contrib/osmo-remsim.spec.in @@ -12,24 +12,23 @@ # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. -# Please submit bugfixes or comments via http://bugs.opensuse.org/ -# - %define sover 1 Name: osmo-remsim -Version: 0.2.2.86 +Version: @VERSION@ Release: 0 Summary: Osmocom remote SIM software suite License: GPL-2.0-or-later Group: Productivity/Telephony/Servers -URL: https://projects.osmocom.org/projects/osmo-remsim +URL: https://osmocom.org/projects/osmo-remsim Source: %{name}-%{version}.tar.xz BuildRequires: autoconf BuildRequires: automake BuildRequires: libcsv-devel BuildRequires: libtool BuildRequires: pkgconfig +%if 0%{?suse_version} BuildRequires: systemd-rpm-macros +%endif BuildRequires: pkgconfig(libasn1c) >= 0.9.30 BuildRequires: pkgconfig(libosmoabis) BuildRequires: pkgconfig(libosmocore) >= 0.11.0 @@ -40,7 +39,7 @@ BuildRequires: pkgconfig(libulfius) BuildRequires: pkgconfig(libusb-1.0) BuildRequires: pkgconfig(libosmousb) BuildRequires: pkgconfig(libosmo-simtrace2) -%{?systemd_ordering} +%{?systemd_requires} %description osmo-remsim is a suite of software programs enabling physical/geographic @@ -159,6 +158,7 @@ make %{?_smp_mflags} check || find . -name testsuite.log -exec cat {} + %post -n libosmo-rspro%{sover} -p /sbin/ldconfig %postun -n libosmo-rspro%{sover} -p /sbin/ldconfig +%if 0%{?suse_version} %pre -n osmo-remsim-bankd %service_add_pre osmo-remsim-bankd.service %post -n osmo-remsim-bankd %service_add_post osmo-remsim-bankd.service %preun -n osmo-remsim-bankd %service_del_preun osmo-remsim-bankd.service @@ -173,6 +173,7 @@ make %{?_smp_mflags} check || find . -name testsuite.log -exec cat {} + %post -n osmo-remsim-server %service_add_post osmo-remsim-server.service %preun -n osmo-remsim-server %service_del_preun osmo-remsim-server.service %postun -n osmo-remsim-server %service_del_postun osmo-remsim-server.service +%endif %files -n libosmo-rspro%{sover} %license COPYING @@ -180,9 +181,8 @@ make %{?_smp_mflags} check || find . -name testsuite.log -exec cat {} + %{_libdir}/libosmo-rspro.so.%{sover}* %files -n libosmo-rspro-devel -%{_includedir}/osmocom %dir %{_includedir}/osmocom/rspro -%{_includedir}/osmocom/rspro/rspro_client.h +%{_includedir}/osmocom/rspro/* %{_libdir}/libosmo-rspro.so %{_libdir}/pkgconfig/libosmo-rspro.pc @@ -204,12 +204,13 @@ make %{?_smp_mflags} check || find . -name testsuite.log -exec cat {} + %config %{_sysconfdir}/default/osmo-remsim-client* %files -n libifd-osmo-remsim-client0 -%dir %{_libdir}/readers/ +%if 0%{?centos_ver} +%dir %{_libdir}/pcsc/drivers/libifd-osmo-remsim-client.bundle +%{_libdir}/pcsc/drivers/libifd-osmo-remsim-client.bundle/* +%else %dir %{_libdir}/readers/libifd-osmo-remsim-client.bundle -%dir %{_libdir}/readers/libifd-osmo-remsim-client.bundle/Contents -%{_libdir}/readers/libifd-osmo-remsim-client.bundle/Contents/PkgInfo -%dir %{_libdir}/readers/libifd-osmo-remsim-client.bundle/Contents/Linux -%{_libdir}/readers/libifd-osmo-remsim-client.bundle/Contents/Linux/libifd_remsim_client.so* +%{_libdir}/readers/libifd-osmo-remsim-client.bundle/* +%endif %config %{_sysconfdir}/reader.conf.d/osmo-remsim-client-reader_conf %changelog