blob: de93149265ce7fec186760098b9b2e6585e00bd9 [file] [log] [blame]
Oliver Smithb0925892020-05-14 11:48:32 +02001#
2# spec file for package osmo-msc
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
Oliver Smithb0925892020-05-14 11:48:32 +020015## Disable LTO for now since it breaks compilation of the tests
16## https://osmocom.org/issues/4115
17%define _lto_cflags %{nil}
18
Oliver Smithb0925892020-05-14 11:48:32 +020019%define with_iu 1
20Name: osmo-msc
Oliver Smith03145932020-05-14 11:49:00 +020021Version: @VERSION@
Oliver Smithb0925892020-05-14 11:48:32 +020022Release: 0
23Summary: Osmocom's MSC for 2G and 3G circuit-switched mobile networks
24License: AGPL-3.0-or-later AND GPL-2.0-only
25Group: Productivity/Telephony/Servers
Oliver Smith03145932020-05-14 11:49:00 +020026URL: https://osmocom.org/projects/osmomsc
Oliver Smithb0925892020-05-14 11:48:32 +020027Source: %{name}-%{version}.tar.xz
28BuildRequires: autoconf
29BuildRequires: automake
Oliver Smithb0925892020-05-14 11:48:32 +020030BuildRequires: libtool
Oliver Smith03145932020-05-14 11:49:00 +020031%if 0%{?suse_version}
32BuildRequires: systemd-rpm-macros
33%endif
Oliver Smithb0925892020-05-14 11:48:32 +020034BuildRequires: pkgconfig >= 0.20
Harald Welte467fc572022-05-13 19:48:08 +020035BuildRequires: pkgconfig(sqlite3)
Oliver Smithb0925892020-05-14 11:48:32 +020036BuildRequires: pkgconfig(libcrypto) >= 0.9.5
Pau Espin Pedrol7eefae42023-09-12 16:46:11 +020037BuildRequires: pkgconfig(libosmo-gsup-client) >= 1.7.0
38BuildRequires: pkgconfig(libosmo-mgcp-client) >= 1.12.0
39BuildRequires: pkgconfig(libosmo-netif) >= 1.4.0
40BuildRequires: pkgconfig(libosmo-sccp) >= 1.8.0
41BuildRequires: pkgconfig(libosmo-sigtran) >= 1.8.0
42BuildRequires: pkgconfig(libosmoabis) >= 1.5.0
43BuildRequires: pkgconfig(libosmocore) >= 1.9.0
44BuildRequires: pkgconfig(libosmoctrl) >= 1.9.0
45BuildRequires: pkgconfig(libosmogsm) >= 1.9.0
46BuildRequires: pkgconfig(libosmovty) >= 1.9.0
Pau Espin Pedrol59764b62021-02-23 20:22:34 +010047BuildRequires: pkgconfig(libsmpp34) >= 1.14.0
Oliver Smithb0925892020-05-14 11:48:32 +020048####
49BuildRequires: lksctp-tools-devel
50####
51%{?systemd_requires}
52%if %{with_iu}
53BuildRequires: pkgconfig(libasn1c) >= 0.9.30
Pau Espin Pedrol7eefae42023-09-12 16:46:11 +020054BuildRequires: pkgconfig(libosmo-ranap) >= 1.5.0
Oliver Smithb0925892020-05-14 11:48:32 +020055%endif
56
57%description
58The Mobile Switching Center (MSC) is the heart of 2G/3G
59circuit-switched services. It terminates the A-interface links from the
60Base Station Controllers (BSC) and handles the MM and CC sub-layers of
61the Layer 3 protocol from the phones (MS).
62
63This Osmocom implementation of the MSC handles A interfaces via 3GPP
64AoIP in an ASP role. It furthermore implements IETF MGCP against an
65external media gateway, such as OsmoMGW. It does *not* implement MAP
66towards a HLR, but the much simpler Osmocom GSUP protocol, which can
67be translated to MAP if needed.
68
69%prep
70%setup -q
71
72%build
73echo "%{version}" >.tarball-version
74autoreconf -fi
75%configure \
76%if %{with_iu}
77 --enable-iu \
78%endif
Harald Welte5c38c812020-06-03 14:45:21 +020079 --enable-smpp \
Oliver Smithb0925892020-05-14 11:48:32 +020080 --docdir=%{_docdir}/%{name} \
81 --with-systemdsystemunitdir=%{_unitdir}
82
83make %{?_smp_mflags}
84
85%install
86%make_install
87
Oliver Smith03145932020-05-14 11:49:00 +020088%if 0%{?suse_version}
Oliver Smithb0925892020-05-14 11:48:32 +020089%preun
90%service_del_preun %{name}.service
91
92%postun
93%service_del_postun %{name}.service
94
95%pre
96%service_add_pre %{name}.service
97
98%post
99%service_add_post %{name}.service
Oliver Smith03145932020-05-14 11:49:00 +0200100%endif
Oliver Smithb0925892020-05-14 11:48:32 +0200101
102%check
103make %{?_smp_mflags} check || (find . -name testsuite.log -exec cat {} +)
104
105%files
106%license COPYING
Harald Welte2eaaf6f2022-06-21 09:50:53 +0200107%doc AUTHORS README.md
Oliver Smithb0925892020-05-14 11:48:32 +0200108%dir %{_docdir}/%{name}/examples
109%dir %{_docdir}/%{name}/examples/osmo-msc
110%{_docdir}/%{name}/examples/osmo-msc/osmo-msc.cfg
111%{_docdir}/%{name}/examples/osmo-msc/osmo-msc_custom-sccp.cfg
112%{_docdir}/%{name}/examples/osmo-msc/osmo-msc_multi-cs7.cfg
113%{_bindir}/osmo-msc
114%{_unitdir}/%{name}.service
115%dir %{_sysconfdir}/osmocom
Harald Weltea4a45252020-06-22 14:21:37 +0200116%config(noreplace) %{_sysconfdir}/osmocom/osmo-msc.cfg
Oliver Smithb0925892020-05-14 11:48:32 +0200117
118%changelog