blob: c11bd88966841873a5c064ab5b144d703275937b [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 Welteb53e2bf2020-08-21 16:33:42 +020028BuildRequires: automake >= 1.9
29BuildRequires: libtool >= 2
30BuildRequires: pkgconfig >= 0.20
31%if 0%{?suse_version}
32BuildRequires: systemd-rpm-macros
33%endif
34BuildRequires: pkgconfig(libosmo-netif) >= 0.6.0
35BuildRequires: pkgconfig(libosmo-sccp) >= 0.10.0
36BuildRequires: pkgconfig(libosmo-sigtran) >= 0.10.0
37BuildRequires: pkgconfig(libosmocore) >= 1.2.0
38BuildRequires: pkgconfig(libosmoctrl) >= 1.2.0
39BuildRequires: pkgconfig(libosmogsm) >= 1.2.0
40BuildRequires: pkgconfig(libosmovty) >= 1.2.0
41BuildRequires: pkgconfig(talloc)
42%{?systemd_requires}
43
44%description
45OsmoBSC: Osmocom's Base Station Controller for 2G circuit-switched mobile networks.
46
47%prep
48%setup -q
49
50%build
51echo "%{version}" >.tarball-version
52autoreconf -fi
53%configure \
54 --docdir=%{_docdir}/%{name} \
55 --with-systemdsystemunitdir=%{_unitdir}
56make %{?_smp_mflags}
57
58%install
59%make_install
60
61%if 0%{?suse_version}
62%preun
63%service_del_preun %{name}.service
64
65%postun
66%service_del_postun %{name}.service
67
68%pre
69%service_add_pre %{name}.service
70
71%post
72%service_add_post %{name}.service
73%endif
74
75%check
76make %{?_smp_mflags} check || (find . -name testsuite.log -exec cat {} +)
77
78%files
79%license COPYING
80%doc AUTHORS README
81%{_bindir}/osmo-smlc
82%dir %{_docdir}/%{name}/examples
83%dir %{_docdir}/%{name}/examples/osmo-smlc
84%{_docdir}/%{name}/examples/osmo-smlc/osmo-smlc.cfg
85%dir %{_sysconfdir}/osmocom
86%config(noreplace) %{_sysconfdir}/osmocom/osmo-smlc.cfg
87%{_unitdir}/%{name}.service
88
89%changelog