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