File srsLTE.spec of Package srsLTE
#
# spec file for package srsLTE
#
# Copyright (c) 2017-2020, 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
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# 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 realver 20_10
%define sover 0
Name: srsLTE
Version: 20.10.1
Release: 0
Summary: Open source 3GPP LTE library
# libraries are using GPL2.0 and LGPL-2.0 - see file COPYRIGHT
License: AGPL-3.0-only
Group: Productivity/Hamradio/Other
URL: https://github.com/srsLTE/srsLTE
#Git-Clone: https://github.com/srsLTE/srsLTE.git
Source: https://github.com/srsLTE/srsLTE/archive/release_%{realver}.tar.gz#/%{name}-%{version}.tar.gz
Patch0: srsLTE-disable-test-benchmark_radio_multi_rf.patch
BuildRequires: chrpath
BuildRequires: cmake
BuildRequires: gcc-c++
# kernel-default and kmod needed for the SCTP-related unit-tests
BuildRequires: kernel-default
BuildRequires: kmod
#
BuildRequires: lksctp-tools-devel
BuildRequires: mbedtls-devel
BuildRequires: pkgconfig
BuildRequires: srsgui-devel
BuildRequires: pkgconfig(SoapySDR)
BuildRequires: pkgconfig(fftw3f)
BuildRequires: pkgconfig(libbladeRF)
BuildRequires: pkgconfig(libconfig++)
BuildRequires: pkgconfig(libpcsclite)
BuildRequires: pkgconfig(libzmq)
BuildRequires: pkgconfig(uhd)
BuildRequires: pkgconfig(volk)
ExclusiveArch: %{ix86} x86_64
%if 0%{?suse_version} > 1325
BuildRequires: libboost_program_options-devel
BuildRequires: libboost_system-devel
%else
BuildRequires: boost-devel
%endif
%description
srsLTE is a free and open-source LTE software suite.
It includes:
* srsUE - a complete SDR LTE UE application featuring all layers
from PHY to IP
* srsENB - a complete SDR LTE eNodeB application
* srsEPC - a light-weight LTE core network implementation with MME,
HSS and S/P-GW
* a highly modular set of common libraries for PHY, MAC, RLC, PDCP,
RRC, NAS, S1AP and GW layers.
The libraries are highly modular with minimum inter-module or external
dependencies.
%package -n libsrslte_rf%{sover}
Summary: srsLTE RF Library
Group: System/Libraries
%description -n libsrslte_rf%{sover}
srsLTE is a free and open-source LTE software suite.
It includes:
* srsUE - a complete SDR LTE UE application featuring all layers
from PHY to IP
* srsENB - a complete SDR LTE eNodeB application
* srsEPC - a light-weight LTE core network implementation with MME,
HSS and S/P-GW
* a highly modular set of common libraries for PHY, MAC, RLC, PDCP,
RRC, NAS, S1AP and GW layers.
The libraries are highly modular with minimum inter-module or external
dependencies.
This package contains the shared library.
%package devel
Summary: Development files for the library
Group: Development/Libraries/C and C++
%description devel
This subpackage contains libraries and header files for developing
applications that want to make use of libsrslte.
%prep
%setup -q -n %{name}-release_%{realver}
%patch0 -p1
%build
mkdir build
cd build
# FIXME: you should use the %%cmake macros
cmake .. \
-DCMAKE_INSTALL_PREFIX=%{_prefix} \
-DSHARE_INSTALL_PREFIX=%{_datadir} \
-DCMAKE_INSTALL_LIBDIR=%{_libdir} \
-DCMAKE_INSTALL_LIBDIR:PATH=%{_lib} \
-DENABLE_SRSUE=ON \
-DENABLE_SRSENB=ON \
-DENABLE_VOLK=ON \
-DENABLE_GUI=ON \
-DENABLE_BLADERF=ON
%make_build
%install
%cmake_install
install -d %{buildroot}/%{_sysconfdir}/srslte
## install examples
# FIXME: should be in an other path
mkdir -p "%{buildroot}%{_libdir}/srslte"
for f in $(find build/lib/examples/ -type f -executable); do
chrpath -d "$f"
install -Dpm0755 "$f" "%{buildroot}%{_libdir}/srslte/"
done
%check
export LD_LIBRARY_PATH=%{buildroot}%{_libdir}
cd build
make test %{?_smp_mflags}
%post -n libsrslte_rf%{sover} -p /sbin/ldconfig
%postun -n libsrslte_rf%{sover} -p /sbin/ldconfig
%files
%license LICENSE COPYRIGHT
%doc README.md
%{_datadir}/srslte
%config %{_sysconfdir}/srslte
%{_bindir}/srsenb
%{_bindir}/srsepc
%{_bindir}/srsue
%{_bindir}/srsmbms
%{_bindir}/srsepc_if_masq.sh
%{_bindir}/srslte_install_configs.sh
%{_libdir}/libasn1_utils.a
%{_libdir}/librrc_asn1.a
%{_libdir}/libs1ap_asn1.a
%{_libdir}/libsrslog.a
%{_libdir}/libsrslte_common.a
%{_libdir}/libsrslte_mac.a
%{_libdir}/libsrslte_phy.a
%{_libdir}/libsrslte_radio.a
%{_libdir}/libsrslte_rf.so
%{_libdir}/libsrslte_upper.a
# examples
%dir %{_libdir}/srslte/
%{_libdir}/srslte/cell_search
%{_libdir}/srslte/cell_search_nbiot
%{_libdir}/srslte/npdsch_enodeb
%{_libdir}/srslte/npdsch_ue
%{_libdir}/srslte/pdsch_enodeb
%{_libdir}/srslte/pdsch_ue
%{_libdir}/srslte/pssch_ue
%{_libdir}/srslte/synch_file
%{_libdir}/srslte/usrp_capture
%{_libdir}/srslte/usrp_capture_sync
%{_libdir}/srslte/usrp_capture_sync_nbiot
%{_libdir}/srslte/usrp_txrx
%{_libdir}/srslte/zmq_remote_rx
%files -n libsrslte_rf%{sover}
%{_libdir}/libsrslte_rf.so.*
%files devel
%{_includedir}/srslte/
%changelog