File openlte.spec of Package openlte
#
# spec file for package openlte
#
# Copyright (c) 2017, 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 v00-20-05
Name: openlte
Version: 0.20.05
Release: 0
Summary: An open source 3GPP LTE implementation
License: AGPL-3.0
Group: Productivity/Telephony/Servers
URL: http://sourceforge.net/projects/openlte
Source: http://downloads.sourceforge.net/project/%{name}/openlte_%{realver}.tgz
Patch0: openlte-cmake-mbedtls.patch
BuildRequires: boost-devel
BuildRequires: cmake
BuildRequires: fdupes
BuildRequires: gcc-c++
BuildRequires: mbedtls-devel
BuildRequires: pkgconfig
BuildRequires: python-devel
BuildRequires: swig
BuildRequires: pkgconfig(fftw3)
BuildRequires: pkgconfig(gnuradio-osmosdr)
BuildRequires: pkgconfig(gnuradio-runtime)
BuildRequires: pkgconfig(libbladeRF)
BuildRequires: pkgconfig(log4cpp)
BuildRequires: pkgconfig(uhd)
# HACK: dependency for mbedtls
%if 0%{?suse_version} >= 1320
BuildRequires: pkgconfig(zlib)
%endif
ExclusiveArch: %{ix86} x86_64
%description
OpenLTE is an open source implementation of the 3GPP LTE specifications.
Currently, octave code is available for test and simulation of downlink
transmit and receive functionality and uplink PRACH transmit and receive
functionality.
In addition, GNU Radio applications are available for downlink transmit
and receive to and from a file and downlink receive using rtl-sdr or
HackRF.
%package devel
Summary: Development files for openlte
Group: Development/Libraries/C and C++
%description devel
This subpackage contains libraries and header files for openlte.
%prep
%setup -q -n %{name}_%{realver}
# FIXME: remove exceutable flags from documentation
chmod -x octave/*m
chmod -x AUTHORS ChangeLog COPYING NEWS README
# HACK: needed for mbedtls (upstream only provides support for polarssl)
%if 0%{?suse_version} >= 1320
%patch0 -p1
%endif
%build
mkdir build
cd build
# FIXME: build with the %%cmake macros is br0ken
cmake .. \
%if "%{?_lib}" == "lib64"
-DLIB_SUFFIX=64 \
%endif
-DCMAKE_C_FLAGS:STRING="%{optflags}" \
-DCMAKE_INSTALL_PREFIX=%{_prefix} \
-DMBEDTLS_INCLUDE_DIRS=%{_includedir}
make VERBOSE=1 %{?_smp_mflags}
%install
%cmake_install
%fdupes %{buildroot}
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%files
%doc AUTHORS ChangeLog COPYING README
%{_bindir}/LTE_*
%{_libdir}/libLTE_fdd_dl_fg.so
%{_libdir}/libLTE_fdd_dl_fs.so
%{python_sitearch}/LTE_fdd_dl_fg
%{python_sitearch}/LTE_fdd_dl_fs
%files devel
%doc octave/
%{_includedir}/LTE_fdd_dl_fg
%{_includedir}/LTE_fdd_dl_fg/swig
%{_includedir}/LTE_fdd_dl_fg/swig/LTE_fdd_dl_fg.i
%{_includedir}/LTE_fdd_dl_fs
%{_includedir}/LTE_fdd_dl_fs/swig
%{_includedir}/LTE_fdd_dl_fs/swig/LTE_fdd_dl_fs.i
%changelog