File srsRAN_Project.spec of Package srsRAN_Project

#
# spec file for package srsRAN_Project (5G RAN)
#
# Copyright (c) 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 24_04
%define sover   0
Name:           srsRAN_Project
Version:        24.04
Release:        0
Summary:        Open source O-RAN 5G CU/DU solution
License:        AGPL-3.0-only
Group:          Productivity/Hamradio/Other
URL:            https://www.srsran.com/
#Git-Clone:     https://github.com/srsran/srsRAN_Project.git
Source:         https://github.com/srsran/srsRAN_Project/archive/refs/tags/release_%{realver}.tar.gz#/%{name}-%{version}.tar.gz
Source99:       %{name}-rpmlintrc
BuildRequires:  binutils-devel
BuildRequires:  cmake
BuildRequires:  cppzmq-devel
BuildRequires:  gcc-c++
BuildRequires:  gtest
## 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:  pkgconfig(fftw3f) >= 3.0
BuildRequires:  pkgconfig(libdw)
BuildRequires:  pkgconfig(libdwarf)
BuildRequires:  pkgconfig(uhd)
BuildRequires:  pkgconfig(yaml-cpp)
ExclusiveArch:  %{ix86} x86_64

%description
The srsRAN Project is a complete 5G RAN solution, featuring
an ORAN-native CU/DU developed by SRS.

The solution includes a complete L1/2/3 implementation with minimal
external dependencies. Portable across processor architectures, the
software has been optimized for x86 and ARM. srsRAN follows the
3GPP 5G system architecture implementing the functional splits
between distributed unit (DU) and centralized unit (CU).
The CU is further disaggregated into control plane (CU-CP) and
user-plane (CU-UP).

%package devel
Summary:        Development files for the srsRAN 5G libraries
Group:          Development/Libraries/C and C++

%description devel
This subpackage contains libraries and header files for developing
applications that want to make use of the srsRAN 5G libraries.

%prep
%setup -q -n %{name}-release_%{realver}

%build
mkdir build
cd build
# FIXME: you should use the %%cmake macros
cmake .. \
    -DBUILD_SHARED_LIBS:BOOL=OFF \
    -DBUILD_STATIC_LIBS:BOOL=ON \
    -DENABLE_WERROR=OFF \
    -DCMAKE_INSTALL_PREFIX=%{_prefix} \
    -DSHARE_INSTALL_PREFIX=%{_datadir} \
    -DCMAKE_INSTALL_LIBDIR=%{_libdir} \
    -DCMAKE_INSTALL_LIBDIR:PATH=%{_lib} \
    -DENABLE_UHD=ON \
    -DENABLE_ZEROMQ=ON \
    -DENABLE_FFTW=ON
%make_build

%install
%cmake_install

%check
export LD_LIBRARY_PATH=%{buildroot}%{_libdir}
cd build
%make_build test

%files
%license LICENSE COPYRIGHT
%doc CHANGELOG README.md
%{_bindir}/gnb
# examples
%dir %{_datadir}/srsran
%{_datadir}/srsran/cell_cfg_max_128_ues.yml
%{_datadir}/srsran/cell_cfg_max_32_ues.yml
%{_datadir}/srsran/cell_cfg_max_64_ues.yml
%{_datadir}/srsran/geo_ntn.yml
%{_datadir}/srsran/gnb_custom_cell_properties.yml
%{_datadir}/srsran/gnb_rf_b200_tdd_n78_20mhz.yml
%{_datadir}/srsran/gnb_rf_b210_fdd_srsUE.yml
%{_datadir}/srsran/gnb_rf_n310_fdd_n3_20mhz.yml
%{_datadir}/srsran/gnb_ru_picocom_scb_tdd_n78_20mhz.yml
%{_datadir}/srsran/gnb_ru_ran550_tdd_n78_100mhz_2x2.yml
%{_datadir}/srsran/gnb_ru_ran550_tdd_n78_20mhz.yml
%{_datadir}/srsran/gnb_ru_rpqn4800e_tdd_n78_20mhz.yml
%{_datadir}/srsran/mimo_usrp.yml
%{_datadir}/srsran/mobility.yml
%{_datadir}/srsran/qam256.yml
%{_datadir}/srsran/qos.yml
%{_datadir}/srsran/slicing.yml
%{_datadir}/srsran/srb.yml

%files devel
%exclude %{_libdir}/libfmt.a
%{_libdir}/liblog_likelihood_ratio.a
%{_libdir}/libsrslog.a
%{_libdir}/libsrsran_channel_coding.a
%{_libdir}/libsrsran_channel_equalizer.a
%{_libdir}/libsrsran_channel_modulation.a
%{_libdir}/libsrsran_channel_precoder.a
%{_libdir}/libsrsran_channel_processors.a
%{_libdir}/libsrsran_crc_calculator.a
%{_libdir}/libsrsran_generic_funcs.a
%{_libdir}/libsrsran_generic_funcs_dft.a
%{_libdir}/libsrsran_instrumentation.a
%{_libdir}/libsrsran_ldpc.a
%{_libdir}/libsrsran_network.a
%{_libdir}/libsrsran_pbch_encoder.a
%{_libdir}/libsrsran_pbch_modulator.a
%{_libdir}/libsrsran_pdcch_encoder.a
%{_libdir}/libsrsran_pdcch_modulator.a
%{_libdir}/libsrsran_pdcch_processor.a
%{_libdir}/libsrsran_pdsch_encoder.a
%{_libdir}/libsrsran_pdsch_modulator.a
%{_libdir}/libsrsran_pdsch_processor.a
%{_libdir}/libsrsran_phy_support.a
%{_libdir}/libsrsran_polar.a
%{_libdir}/libsrsran_prach_detector.a
%{_libdir}/libsrsran_pucch_demodulator.a
%{_libdir}/libsrsran_pucch_detector.a
%{_libdir}/libsrsran_pucch_processor.a
%{_libdir}/libsrsran_pusch_processor.a
%{_libdir}/libsrsran_radio.a
%{_libdir}/libsrsran_radio_uhd.a
%{_libdir}/libsrsran_radio_zmq.a
%{_libdir}/libsrsran_ran.a
%{_libdir}/libsrsran_sequence_generators.a
%{_libdir}/libsrsran_short_block.a
%{_libdir}/libsrsran_signal_processors.a
%{_libdir}/libsrsran_ssb_processor.a
%{_libdir}/libsrsran_support.a
%{_libdir}/libsrsran_uci_decoder.a
%{_libdir}/libsrsran_upper_phy_support.a
%{_libdir}/libsrsvec.a

%changelog
openSUSE Build Service is sponsored by