blob: 657afc825f18b143e4d29815b162e86a1688d1c4 [file] [log] [blame]
Harald Welteb53e2bf2020-08-21 16:33:42 +02001#
2# spec file for package osmo-smlc
3#
4# Copyright (c) 2017, Martin Hauke <mardnh@gmx.de>
5#
6# All modifications and additions to the file contributed by third parties
7# remain the property of their copyright owners, unless otherwise agreed
8# upon. The license for this file, and modifications and additions to the
9# file, is the same license as for the pristine package itself (unless the
10# license for the pristine package is not an Open Source License, in which
11# case the license is the MIT License). An "Open Source License" is a
12# license that conforms to the Open Source Definition (Version 1.9)
13# published by the Open Source Initiative.
14
15## Disable LTO for now since it breaks compilation of the tests
16## https://osmocom.org/issues/4113
17%define _lto_cflags %{nil}
18
19Name: osmo-smlc
20Version: @VERSION@
21Release: 0
22Summary: OsmoSMLC: Osmocom's Location Service Center
23License: AGPL-3.0-or-later
24Group: Hardware/Mobile
25URL: https://osmocom.org/projects/osmo-smlc
26Source: %{name}-%{version}.tar.xz
Harald Weltefb2abb82020-10-21 20:58:02 +020027BuildRequires: autoconf
Harald Weltedbf98d52020-10-22 08:05:51 +020028BuildRequires: autoconf-archive
Harald Welteb53e2bf2020-08-21 16:33:42 +020029BuildRequires: automake >= 1.9
30BuildRequires: libtool >= 2
31BuildRequires: pkgconfig >= 0.20
32%if 0%{?suse_version}
33BuildRequires: systemd-rpm-macros
34%endif
35BuildRequires: pkgconfig(libosmo-netif) >= 0.6.0
36BuildRequires: pkgconfig(libosmo-sccp) >= 0.10.0
37BuildRequires: pkgconfig(libosmo-sigtran) >= 0.10.0
38BuildRequires: pkgconfig(libosmocore) >= 1.2.0
39BuildRequires: pkgconfig(libosmoctrl) >= 1.2.0
40BuildRequires: pkgconfig(libosmogsm) >= 1.2.0
41BuildRequires: pkgconfig(libosmovty) >= 1.2.0
42BuildRequires: pkgconfig(talloc)
43%{?systemd_requires}
44
45%description
46OsmoBSC: Osmocom's Base Station Controller for 2G circuit-switched mobile networks.
47
48%prep
49%setup -q
50
51%build
52echo "%{version}" >.tarball-version
53autoreconf -fi
54%configure \
55 --docdir=%{_docdir}/%{name} \
56 --with-systemdsystemunitdir=%{_unitdir}
57make %{?_smp_mflags}
58
59%install
60%make_install
61
62%if 0%{?suse_version}
63%preun
64%service_del_preun %{name}.service
65
66%postun
67%service_del_postun %{name}.service
68
69%pre
70%service_add_pre %{name}.service
71
72%post
73%service_add_post %{name}.service
74%endif
75
76%check
77make %{?_smp_mflags} check || (find . -name testsuite.log -exec cat {} +)
78
79%files
80%license COPYING
81%doc AUTHORS README
82%{_bindir}/osmo-smlc
83%dir %{_docdir}/%{name}/examples
84%dir %{_docdir}/%{name}/examples/osmo-smlc
85%{_docdir}/%{name}/examples/osmo-smlc/osmo-smlc.cfg
86%dir %{_sysconfdir}/osmocom
87%config(noreplace) %{_sysconfdir}/osmocom/osmo-smlc.cfg
88%{_unitdir}/%{name}.service
89
90%changelog