File srsRAN.spec of Package srsRAN
#
# spec file for package srsRAN (former srsLTE)
#
# Copyright (c) 2017-2024, 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 23_11
%define sover 0
Name: srsRAN
Version: 23.11
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://www.srsran.com/
#Git-Clone: https://github.com/srsran/srsRAN.git
Source: https://github.com/srsran/srsRAN_4G/archive/refs/tags/release_%{realver}.tar.gz#/%{name}-%{version}.tar.gz
Patch1: 0001-build-remove-boost-system-dependency.patch
BuildRequires: binutils-devel
BuildRequires: chrpath
BuildRequires: cmake
BuildRequires: cppzmq-devel
BuildRequires: gcc-c++
# kernel-default and kmod needed for the SCTP-related unit-tests
BuildRequires: kernel-default
BuildRequires: kmod
BuildRequires: libboost_program_options-devel
##
BuildRequires: lksctp-tools-devel
BuildRequires: mbedtls-devel
BuildRequires: pkgconfig
BuildRequires: pkgconfig(SoapySDR)
BuildRequires: pkgconfig(fftw3f)
BuildRequires: pkgconfig(libbladeRF)
BuildRequires: pkgconfig(libconfig++)
BuildRequires: pkgconfig(libdw)
BuildRequires: pkgconfig(libdwarf)
BuildRequires: pkgconfig(libpcsclite)
BuildRequires: pkgconfig(libzmq)
BuildRequires: pkgconfig(uhd)
BuildRequires: pkgconfig(volk)
Conflicts: srsLTE
ExclusiveArch: %{ix86} x86_64
%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 libsrsran_rf%{sover}
Summary: srsLTE RF Library
Group: System/Libraries
%description -n libsrsran_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 libsrsran 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 libsrsran.
%prep
%setup -q -n %{name}_4G-release_%{realver}
%autopatch -p1
%build
mkdir build
cd build
# FIXME: you should use the %%cmake macros
cmake .. \
-DENABLE_WERROR=OFF \
-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=OFF \
-DENABLE_BLADERF=ON
%make_build
%install
%cmake_install
install -d %{buildroot}/%{_sysconfdir}/srsran
## install examples
# FIXME: should be in an other path
mkdir -p "%{buildroot}%{_libdir}/srsran"
for f in $(find build/lib/examples/ -type f -executable); do
chrpath -d "$f"
install -Dpm0755 "$f" "%{buildroot}%{_libdir}/srsran/"
done
%check
export LD_LIBRARY_PATH=%{buildroot}%{_libdir}
cd build
%make_build test
%post -n libsrsran_rf%{sover} -p /sbin/ldconfig
%postun -n libsrsran_rf%{sover} -p /sbin/ldconfig
%files
%license LICENSE COPYRIGHT
%doc README.md
%{_datadir}/srsran
%config %{_sysconfdir}/srsran
%{_bindir}/srsenb
%{_bindir}/srsepc
%{_bindir}/srsue
%{_bindir}/srsmbms
%{_bindir}/srsepc_if_masq.sh
%{_bindir}/srsran_install_configs.sh
%{_libdir}/libsrsran_rf.so
%{_libdir}/libsrsran_rf_blade.so
%{_libdir}/libsrsran_rf_soapy.so
%{_libdir}/libsrsran_rf_uhd.so
%{_libdir}/libsrsran_rf_zmq.so
# examples
%dir %{_libdir}/srsran/
%{_libdir}/srsran/cell_search
%{_libdir}/srsran/cell_search_nbiot
%{_libdir}/srsran/npdsch_enodeb
%{_libdir}/srsran/npdsch_ue
%{_libdir}/srsran/pdsch_enodeb
%{_libdir}/srsran/pdsch_ue
%{_libdir}/srsran/pssch_ue
%{_libdir}/srsran/synch_file
%{_libdir}/srsran/usrp_capture
%{_libdir}/srsran/usrp_capture_sync
%{_libdir}/srsran/usrp_capture_sync_nbiot
%{_libdir}/srsran/usrp_txrx
%{_libdir}/srsran/zmq_remote_rx
%files -n libsrsran_rf%{sover}
%{_libdir}/libsrsran_rf*.so.*
%files devel
%{_includedir}/srsran/
%{_libdir}/libasn1_utils.a
%{_libdir}/libnas_5g_msg.a
%{_libdir}/librrc_asn1.a
%{_libdir}/libngap_nr_asn1.a
%{_libdir}/librrc_nr_asn1.a
%{_libdir}/libs1ap_asn1.a
%{_libdir}/libsrslog.a
%{_libdir}/libsrsran_common.a
%{_libdir}/libsrsran_gtpu.a
%{_libdir}/libsrsran_mac.a
%{_libdir}/libsrsran_pdcp.a
%{_libdir}/libsrsran_phy.a
%{_libdir}/libsrsran_radio.a
%{_libdir}/libsrsran_rlc.a
%{_libdir}/libric_e2.a
%changelog