Oliver Smith | b092589 | 2020-05-14 11:48:32 +0200 | [diff] [blame] | 1 | # |
| 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 Smith | b092589 | 2020-05-14 11:48:32 +0200 | [diff] [blame] | 15 | ## Disable LTO for now since it breaks compilation of the tests |
| 16 | ## https://osmocom.org/issues/4115 |
| 17 | %define _lto_cflags %{nil} |
| 18 | |
Oliver Smith | b092589 | 2020-05-14 11:48:32 +0200 | [diff] [blame] | 19 | %define with_iu 1 |
| 20 | Name: osmo-msc |
Oliver Smith | 0314593 | 2020-05-14 11:49:00 +0200 | [diff] [blame] | 21 | Version: @VERSION@ |
Oliver Smith | b092589 | 2020-05-14 11:48:32 +0200 | [diff] [blame] | 22 | Release: 0 |
| 23 | Summary: Osmocom's MSC for 2G and 3G circuit-switched mobile networks |
| 24 | License: AGPL-3.0-or-later AND GPL-2.0-only |
| 25 | Group: Productivity/Telephony/Servers |
Oliver Smith | 0314593 | 2020-05-14 11:49:00 +0200 | [diff] [blame] | 26 | URL: https://osmocom.org/projects/osmomsc |
Oliver Smith | b092589 | 2020-05-14 11:48:32 +0200 | [diff] [blame] | 27 | Source: %{name}-%{version}.tar.xz |
| 28 | BuildRequires: autoconf |
| 29 | BuildRequires: automake |
| 30 | BuildRequires: libdbi-drivers-dbd-sqlite3 |
| 31 | BuildRequires: libtool |
Oliver Smith | 0314593 | 2020-05-14 11:49:00 +0200 | [diff] [blame] | 32 | %if 0%{?suse_version} |
| 33 | BuildRequires: systemd-rpm-macros |
| 34 | %endif |
Oliver Smith | b092589 | 2020-05-14 11:48:32 +0200 | [diff] [blame] | 35 | BuildRequires: pkgconfig >= 0.20 |
| 36 | BuildRequires: pkgconfig(dbi) |
| 37 | BuildRequires: pkgconfig(libcrypto) >= 0.9.5 |
| 38 | BuildRequires: pkgconfig(libosmo-gsup-client) >= 1.0.0 |
| 39 | BuildRequires: pkgconfig(libosmo-mgcp-client) >= 1.6.0 |
| 40 | BuildRequires: pkgconfig(libosmo-netif) >= 0.4.0 |
| 41 | BuildRequires: pkgconfig(libosmo-sccp) >= 1.1.0 |
| 42 | BuildRequires: pkgconfig(libosmo-sigtran) >= 1.1.0 |
| 43 | BuildRequires: pkgconfig(libosmoabis) >= 0.6.0 |
| 44 | BuildRequires: pkgconfig(libosmocore) >= 1.2.0 |
| 45 | BuildRequires: pkgconfig(libosmoctrl) >= 1.2.0 |
| 46 | BuildRequires: pkgconfig(libosmogsm) >= 1.2.0 |
| 47 | BuildRequires: pkgconfig(libosmovty) >= 1.2.0 |
| 48 | BuildRequires: pkgconfig(libsmpp34) >= 1.13.0 |
| 49 | #### |
| 50 | BuildRequires: lksctp-tools-devel |
| 51 | #### |
| 52 | %{?systemd_requires} |
| 53 | %if %{with_iu} |
| 54 | BuildRequires: pkgconfig(libasn1c) >= 0.9.30 |
| 55 | BuildRequires: pkgconfig(libosmo-ranap) >= 0.3.0 |
| 56 | %endif |
| 57 | |
| 58 | %description |
| 59 | The Mobile Switching Center (MSC) is the heart of 2G/3G |
| 60 | circuit-switched services. It terminates the A-interface links from the |
| 61 | Base Station Controllers (BSC) and handles the MM and CC sub-layers of |
| 62 | the Layer 3 protocol from the phones (MS). |
| 63 | |
| 64 | This Osmocom implementation of the MSC handles A interfaces via 3GPP |
| 65 | AoIP in an ASP role. It furthermore implements IETF MGCP against an |
| 66 | external media gateway, such as OsmoMGW. It does *not* implement MAP |
| 67 | towards a HLR, but the much simpler Osmocom GSUP protocol, which can |
| 68 | be translated to MAP if needed. |
| 69 | |
| 70 | %prep |
| 71 | %setup -q |
| 72 | |
| 73 | %build |
| 74 | echo "%{version}" >.tarball-version |
| 75 | autoreconf -fi |
| 76 | %configure \ |
| 77 | %if %{with_iu} |
| 78 | --enable-iu \ |
| 79 | %endif |
Harald Welte | 5c38c81 | 2020-06-03 14:45:21 +0200 | [diff] [blame] | 80 | --enable-smpp \ |
Oliver Smith | b092589 | 2020-05-14 11:48:32 +0200 | [diff] [blame] | 81 | --docdir=%{_docdir}/%{name} \ |
| 82 | --with-systemdsystemunitdir=%{_unitdir} |
| 83 | |
| 84 | make %{?_smp_mflags} |
| 85 | |
| 86 | %install |
| 87 | %make_install |
| 88 | |
Oliver Smith | 0314593 | 2020-05-14 11:49:00 +0200 | [diff] [blame] | 89 | %if 0%{?suse_version} |
Oliver Smith | b092589 | 2020-05-14 11:48:32 +0200 | [diff] [blame] | 90 | %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 Smith | 0314593 | 2020-05-14 11:49:00 +0200 | [diff] [blame] | 101 | %endif |
Oliver Smith | b092589 | 2020-05-14 11:48:32 +0200 | [diff] [blame] | 102 | |
| 103 | %check |
| 104 | make %{?_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 |
| 117 | %config %{_sysconfdir}/osmocom/osmo-msc.cfg |
| 118 | |
| 119 | %changelog |