blob: 912804c4d5a6e899f40d2142c99238feeaf88b61 [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)
Harald Welte467fc572022-05-13 19:48:08 +020037BuildRequires: pkgconfig(sqlite3)
Oliver Smithb0925892020-05-14 11:48:32 +020038BuildRequires: pkgconfig(libcrypto) >= 0.9.5
Pau Espin Pedrolb7f97ea2021-11-16 17:44:54 +010039BuildRequires: pkgconfig(libosmo-gsup-client) >= 1.4.0
40BuildRequires: pkgconfig(libosmo-mgcp-client) >= 1.9.0
Pau Espin Pedrol59764b62021-02-23 20:22:34 +010041BuildRequires: pkgconfig(libosmo-netif) >= 1.1.0
Pau Espin Pedrolb7f97ea2021-11-16 17:44:54 +010042BuildRequires: pkgconfig(libosmo-sccp) >= 1.5.0
43BuildRequires: pkgconfig(libosmo-sigtran) >= 1.5.0
44BuildRequires: pkgconfig(libosmoabis) >= 1.2.0
45BuildRequires: pkgconfig(libosmocore) >= 1.6.0
46BuildRequires: pkgconfig(libosmoctrl) >= 1.6.0
47BuildRequires: pkgconfig(libosmogsm) >= 1.6.0
48BuildRequires: pkgconfig(libosmovty) >= 1.6.0
Pau Espin Pedrol59764b62021-02-23 20:22:34 +010049BuildRequires: pkgconfig(libsmpp34) >= 1.14.0
Oliver Smithb0925892020-05-14 11:48:32 +020050####
51BuildRequires: lksctp-tools-devel
52####
53%{?systemd_requires}
54%if %{with_iu}
55BuildRequires: pkgconfig(libasn1c) >= 0.9.30
Pau Espin Pedrolb7f97ea2021-11-16 17:44:54 +010056BuildRequires: pkgconfig(libosmo-ranap) >= 0.8.0
Oliver Smithb0925892020-05-14 11:48:32 +020057%endif
Oliver Smith5a44e5f2021-03-09 14:29:16 +010058%if 0%{?suse_version}
59Requires: libdbi-drivers-dbd-sqlite3
60%else
61Requires: libdbi-dbd-sqlite
62%endif
Oliver Smithb0925892020-05-14 11:48:32 +020063
64%description
65The Mobile Switching Center (MSC) is the heart of 2G/3G
66circuit-switched services. It terminates the A-interface links from the
67Base Station Controllers (BSC) and handles the MM and CC sub-layers of
68the Layer 3 protocol from the phones (MS).
69
70This Osmocom implementation of the MSC handles A interfaces via 3GPP
71AoIP in an ASP role. It furthermore implements IETF MGCP against an
72external media gateway, such as OsmoMGW. It does *not* implement MAP
73towards a HLR, but the much simpler Osmocom GSUP protocol, which can
74be translated to MAP if needed.
75
76%prep
77%setup -q
78
79%build
80echo "%{version}" >.tarball-version
81autoreconf -fi
82%configure \
83%if %{with_iu}
84 --enable-iu \
85%endif
Harald Welte5c38c812020-06-03 14:45:21 +020086 --enable-smpp \
Oliver Smithb0925892020-05-14 11:48:32 +020087 --docdir=%{_docdir}/%{name} \
88 --with-systemdsystemunitdir=%{_unitdir}
89
90make %{?_smp_mflags}
91
92%install
93%make_install
94
Oliver Smith03145932020-05-14 11:49:00 +020095%if 0%{?suse_version}
Oliver Smithb0925892020-05-14 11:48:32 +020096%preun
97%service_del_preun %{name}.service
98
99%postun
100%service_del_postun %{name}.service
101
102%pre
103%service_add_pre %{name}.service
104
105%post
106%service_add_post %{name}.service
Oliver Smith03145932020-05-14 11:49:00 +0200107%endif
Oliver Smithb0925892020-05-14 11:48:32 +0200108
109%check
110make %{?_smp_mflags} check || (find . -name testsuite.log -exec cat {} +)
111
112%files
113%license COPYING
114%doc AUTHORS README
115%dir %{_docdir}/%{name}/examples
116%dir %{_docdir}/%{name}/examples/osmo-msc
117%{_docdir}/%{name}/examples/osmo-msc/osmo-msc.cfg
118%{_docdir}/%{name}/examples/osmo-msc/osmo-msc_custom-sccp.cfg
119%{_docdir}/%{name}/examples/osmo-msc/osmo-msc_multi-cs7.cfg
120%{_bindir}/osmo-msc
121%{_unitdir}/%{name}.service
122%dir %{_sysconfdir}/osmocom
Harald Weltea4a45252020-06-22 14:21:37 +0200123%config(noreplace) %{_sysconfdir}/osmocom/osmo-msc.cfg
Oliver Smithb0925892020-05-14 11:48:32 +0200124
125%changelog