File osmo-hnbgw.spec of Package osmo-hnbgw

#
# spec file for package osmo-hnbgw
#
# 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/
#


Name:           osmo-hnbgw
Version:        1.7.0.59
Release:        0
Summary:        Osmocom Home Node B Gateway
License:        AGPL-3.0-or-later
Group:          Hardware/Mobile
URL:            https://projects.osmocom.org/projects/osmo-hnbgw
#Git-Clone:     https://gitea.osmocom.org/cellular-infrastructure/osmo-hnbgw.git
Source:         %{name}-%{version}.tar.xz
BuildRequires:  autoconf
BuildRequires:  automake
BuildRequires:  libtool
BuildRequires:  lksctp-tools-devel
BuildRequires:  pkgconfig
BuildRequires:  pkgconfig(libasn1c) >= 0.9.30
BuildRequires:  pkgconfig(libosmo-hnbap) >= 1.7.0
BuildRequires:  pkgconfig(libosmo-mgcp-client) >= 1.14.0
BuildRequires:  pkgconfig(libosmo-netif) >= 1.6.0
BuildRequires:  pkgconfig(libosmo-ranap) >= 1.7.0
BuildRequires:  pkgconfig(libosmo-rua) >= 1.7.0
BuildRequires:  pkgconfig(libosmo-sigtran) >= 2.1.0
BuildRequires:  pkgconfig(libosmocore) >= 1.11.0
BuildRequires:  pkgconfig(libosmoctrl) >= 1.11.0
BuildRequires:  pkgconfig(libosmovty) >= 1.11.0
BuildRequires:  pkgconfig(libosmogsm) >= 1.11.0

%description
OsmoHNBGW: Osmocom Home Node B Gateway.

%prep
%autosetup

%build
echo "%{version}" >.tarball-version
autoreconf -fi
%configure \
  --disable-static \
  --docdir="%{_docdir}/%{name}" \
  --with-systemdsystemunitdir=%{_unitdir}
%make_build

%install
%make_install

%preun
%service_del_preun %{name}.service

%postun
%service_del_postun %{name}.service

%pre
%service_add_pre %{name}.service

%post
%service_add_post %{name}.service

%check
%make_build check || (find . -name testsuite.log -exec cat {} +)

%files
%license COPYING
%doc README.md
%dir %{_docdir}/%{name}/examples
%dir %{_docdir}/%{name}/examples/osmo-hnbgw
%{_docdir}/%{name}/examples/osmo-hnbgw/osmo-hnbgw-cnpool.cfg
%{_docdir}/%{name}/examples/osmo-hnbgw/osmo-hnbgw-cs7.cfg
%{_docdir}/%{name}/examples/osmo-hnbgw/osmo-hnbgw-pfcp.cfg
%{_docdir}/%{name}/examples/osmo-hnbgw/osmo-hnbgw.cfg
%dir %{_sysconfdir}/osmocom
%config(noreplace) %{_sysconfdir}/osmocom/osmo-hnbgw.cfg
%{_bindir}/osmo-hnbgw
%{_unitdir}/%{name}.service

%changelog
openSUSE Build Service is sponsored by