blob: c968d3e905059cc496fc0f273e783c3a7c25e1c3 [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
30BuildRequires: libdbi-drivers-dbd-sqlite3
31BuildRequires: libtool
Oliver Smith03145932020-05-14 11:49:00 +020032%if 0%{?suse_version}
33BuildRequires: systemd-rpm-macros
34%endif
Oliver Smithb0925892020-05-14 11:48:32 +020035BuildRequires: pkgconfig >= 0.20
36BuildRequires: pkgconfig(dbi)
37BuildRequires: pkgconfig(libcrypto) >= 0.9.5
38BuildRequires: pkgconfig(libosmo-gsup-client) >= 1.0.0
39BuildRequires: pkgconfig(libosmo-mgcp-client) >= 1.6.0
40BuildRequires: pkgconfig(libosmo-netif) >= 0.4.0
41BuildRequires: pkgconfig(libosmo-sccp) >= 1.1.0
42BuildRequires: pkgconfig(libosmo-sigtran) >= 1.1.0
43BuildRequires: pkgconfig(libosmoabis) >= 0.6.0
44BuildRequires: pkgconfig(libosmocore) >= 1.2.0
45BuildRequires: pkgconfig(libosmoctrl) >= 1.2.0
46BuildRequires: pkgconfig(libosmogsm) >= 1.2.0
47BuildRequires: pkgconfig(libosmovty) >= 1.2.0
48BuildRequires: pkgconfig(libsmpp34) >= 1.13.0
49####
50BuildRequires: lksctp-tools-devel
51####
52%{?systemd_requires}
53%if %{with_iu}
54BuildRequires: pkgconfig(libasn1c) >= 0.9.30
55BuildRequires: pkgconfig(libosmo-ranap) >= 0.3.0
56%endif
57
58%description
59The Mobile Switching Center (MSC) is the heart of 2G/3G
60circuit-switched services. It terminates the A-interface links from the
61Base Station Controllers (BSC) and handles the MM and CC sub-layers of
62the Layer 3 protocol from the phones (MS).
63
64This Osmocom implementation of the MSC handles A interfaces via 3GPP
65AoIP in an ASP role. It furthermore implements IETF MGCP against an
66external media gateway, such as OsmoMGW. It does *not* implement MAP
67towards a HLR, but the much simpler Osmocom GSUP protocol, which can
68be translated to MAP if needed.
69
70%prep
71%setup -q
72
73%build
74echo "%{version}" >.tarball-version
75autoreconf -fi
76%configure \
77%if %{with_iu}
78 --enable-iu \
79%endif
Harald Welte5c38c812020-06-03 14:45:21 +020080 --enable-smpp \
Oliver Smithb0925892020-05-14 11:48:32 +020081 --docdir=%{_docdir}/%{name} \
82 --with-systemdsystemunitdir=%{_unitdir}
83
84make %{?_smp_mflags}
85
86%install
87%make_install
88
Oliver Smith03145932020-05-14 11:49:00 +020089%if 0%{?suse_version}
Oliver Smithb0925892020-05-14 11:48:32 +020090%preun
91%service_del_preun %{name}.service
92
93%postun
94%service_del_postun %{name}.service
95
96%pre
97%service_add_pre %{name}.service
98
99%post
100%service_add_post %{name}.service
Oliver Smith03145932020-05-14 11:49:00 +0200101%endif
Oliver Smithb0925892020-05-14 11:48:32 +0200102
103%check
104make %{?_smp_mflags} check || (find . -name testsuite.log -exec cat {} +)
105
106%files
107%license COPYING
108%doc AUTHORS README
109%dir %{_docdir}/%{name}/examples
110%dir %{_docdir}/%{name}/examples/osmo-msc
111%{_docdir}/%{name}/examples/osmo-msc/osmo-msc.cfg
112%{_docdir}/%{name}/examples/osmo-msc/osmo-msc_custom-sccp.cfg
113%{_docdir}/%{name}/examples/osmo-msc/osmo-msc_multi-cs7.cfg
114%{_bindir}/osmo-msc
115%{_unitdir}/%{name}.service
116%dir %{_sysconfdir}/osmocom
Harald Weltea4a45252020-06-22 14:21:37 +0200117%config(noreplace) %{_sysconfdir}/osmocom/osmo-msc.cfg
Oliver Smithb0925892020-05-14 11:48:32 +0200118
119%changelog