File openbts-umts.spec of Package openbts-umts

#
# spec file for package openbts_umts
#
# Copyright (c) 2014, 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 openbts_umts_dir /opt/OpenBTS-UMTS/
%define build_doxygen_docs 0

Name:           openbts-umts
Version:        1.0.git20160818
Release:        0
Summary:        OpenBTS-UMTS 3G Data Radio Access Network Node
License:        AGPL-3.0
Group:          Productivity/Telephony/Servers
Url:            http://openbts.org/w/index.php/OpenBTS-UMTS
Source:         OpenBTS-UMTS-%{version}.tar.xz
Patch0:         openbts-umts-fix-gcc6-compile-error.patch
BuildRequires:  autoconf
BuildRequires:  automake
BuildRequires:  asn1c
BuildRequires:  cppzmq-devel
#BuildRequires:  fdupes
BuildRequires:  gcc-c++
BuildRequires:  libtool
BuildRequires:  pkg-config
BuildRequires:  readline-devel
BuildRequires:  pkgconfig(libosip2)
BuildRequires:  pkgconfig(libusb-1.0)
BuildRequires:  pkgconfig(ortp)
BuildRequires:  pkgconfig(sqlite3)
BuildRequires:  uhd-devel
# for git-version-gen
BuildRequires:  git-core
%if 0%{?build_doxygen_docs}
BuildRequires:  doxygen
%endif
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
A Linux-based application that uses a software radio to present a UMTS network
to any standard 3G UMTS handset or modem. It builds upon the OpenBTS framework,
where the MS or UE is treated as an IP endpoint at the edge of the network. 

%prep
%setup -q -n OpenBTS-UMTS-%{version}
cd OpenBTS-UMTS
%patch0 -p1

%build
# FIXME - should be fixed upstream !!
%if 0%{?suse_version} >= 1320
export CXXFLAGS="%{optflags} -fpermissive"
%endif
#
cd OpenBTS-UMTS
./autogen.sh
%configure
make V=99 %{?_smp_mflags}

%install
mkdir -p %{buildroot}/%{_sysconfdir}/OpenBTS/
pushd OpenBTS-UMTS
install -Dm 0755 apps/OpenBTS-UMTS %{buildroot}%{openbts_umts_dir}/OpenBTS-UMTS
install -Dm 0755 apps/OpenBTS-UMTSCLI %{buildroot}%{openbts_umts_dir}/OpenBTS-UMTSCLI
install -Dm 0755 apps/OpenBTS-UMTSDo %{buildroot}%{openbts_umts_dir}/OpenBTS-UMTSDo
install -Dm 0644 apps/OpenBTS-UMTS.example.sql %{buildroot}/%{_sysconfdir}/OpenBTS/OpenBTS-UMTS.example.sql
#install -Dm 0755 TransceiverRAD1/transceiver %%{buildroot}%%{openbts_umts_dir}/transceiver-rad1
install -Dm 0755 TransceiverUHD/transceiver %{buildroot}%{openbts_umts_dir}/transceiver-uhd
%if 0%{?build_doxygen_docs}
mkdir -p %{buildroot}/%{_docdir}/openbts
cp -R dox/html/ %{buildroot}/%{_docdir}/openbts/
%endif

%files
%defattr(-,root,root)
%doc OpenBTS-UMTS/AUTHORS OpenBTS-UMTS/COPYING OpenBTS-UMTS/LEGAL OpenBTS-UMTS/NOTICE OpenBTS-UMTS/README.md
%doc OpenBTS-UMTS/apps/README.DatabaseCreation
%dir %{_sysconfdir}/OpenBTS
%config(noreplace) %{_sysconfdir}/OpenBTS/OpenBTS-UMTS.example.sql
%dir %{openbts_umts_dir}
%{openbts_umts_dir}/OpenBTS-UMTS
%{openbts_umts_dir}/OpenBTS-UMTSCLI
%{openbts_umts_dir}/OpenBTS-UMTSDo
#%%{openbts_umts_dir}/transceiver-rad1
%{openbts_umts_dir}/transceiver-uhd

%changelog
openSUSE Build Service is sponsored by