Oliver Smith | 1465bab | 2020-05-14 11:52:28 +0200 | [diff] [blame] | 1 | # |
| 2 | # spec file for package osmo-sgsn |
| 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 | 1465bab | 2020-05-14 11:52:28 +0200 | [diff] [blame] | 15 | ## Disable LTO for now since it breaks compilation of the tests |
| 16 | ## https://osmocom.org/issues/4116 |
| 17 | %define _lto_cflags %{nil} |
| 18 | |
| 19 | %define with_iu 1 |
| 20 | Name: osmo-sgsn |
Oliver Smith | a40ccf6 | 2020-05-14 11:53:18 +0200 | [diff] [blame] | 21 | Version: @VERSION@ |
Oliver Smith | 1465bab | 2020-05-14 11:52:28 +0200 | [diff] [blame] | 22 | Release: 0 |
| 23 | Summary: Osmocom's SGSN for 2G and 3G packet-switched mobile networks |
| 24 | License: AGPL-3.0-or-later AND GPL-2.0-or-later |
| 25 | Group: Productivity/Telephony/Servers |
Oliver Smith | a40ccf6 | 2020-05-14 11:53:18 +0200 | [diff] [blame] | 26 | URL: https://osmocom.org/projects/osmosgsn |
Oliver Smith | 1465bab | 2020-05-14 11:52:28 +0200 | [diff] [blame] | 27 | Source: %{name}-%{version}.tar.xz |
| 28 | BuildRequires: autoconf |
| 29 | BuildRequires: automake |
| 30 | BuildRequires: libtool |
| 31 | BuildRequires: pkgconfig |
Oliver Smith | a40ccf6 | 2020-05-14 11:53:18 +0200 | [diff] [blame] | 32 | %if 0%{?suse_version} |
Oliver Smith | 1465bab | 2020-05-14 11:52:28 +0200 | [diff] [blame] | 33 | BuildRequires: systemd-rpm-macros |
Oliver Smith | a40ccf6 | 2020-05-14 11:53:18 +0200 | [diff] [blame] | 34 | %endif |
Oliver Smith | 1465bab | 2020-05-14 11:52:28 +0200 | [diff] [blame] | 35 | BuildRequires: pkgconfig(libcares) |
| 36 | BuildRequires: pkgconfig(libcrypto) >= 0.9.5 |
| 37 | BuildRequires: pkgconfig(libgtp) >= 1.4.0 |
| 38 | BuildRequires: pkgconfig(libosmo-gsup-client) >= 1.0.0 |
| 39 | BuildRequires: pkgconfig(libosmo-netif) >= 0.4.0 |
| 40 | BuildRequires: pkgconfig(libosmoabis) >= 0.6.0 |
| 41 | BuildRequires: pkgconfig(libosmocore) >= 1.2.0 |
| 42 | BuildRequires: pkgconfig(libosmoctrl) >= 1.2.0 |
| 43 | BuildRequires: pkgconfig(libosmogb) >= 1.2.0 |
| 44 | BuildRequires: pkgconfig(libosmogsm) >= 1.2.0 |
| 45 | BuildRequires: pkgconfig(libosmovty) >= 1.2.0 |
| 46 | %{?systemd_requires} |
| 47 | %if %{with_iu} |
| 48 | BuildRequires: pkgconfig(libasn1c) |
| 49 | BuildRequires: pkgconfig(libosmo-ranap) >= 0.4.0 |
| 50 | BuildRequires: pkgconfig(libosmo-sigtran) >= 1.0.0 |
| 51 | %endif |
| 52 | |
| 53 | %description |
| 54 | OsmoSGSN is Osmocom's Serving GPRS Support Node for 2G and 3G |
| 55 | packet-switched mobile networks. |
| 56 | |
| 57 | %package -n osmo-gtphub |
| 58 | Summary: Osmocom GTP Hub: Proxy for GTP traffic between multiple SGSNs and GGSNs |
| 59 | Group: Productivity/Telephony/Servers |
| 60 | |
| 61 | %description -n osmo-gtphub |
| 62 | Osmocom GTP Hub: Proxy for GTP traffic between multiple SGSNs and GGSNs. |
| 63 | |
| 64 | %package -n osmo-gbproxy |
| 65 | Summary: Osmocom GPRS Gb Interface Proxy |
| 66 | Group: Productivity/Telephony/Servers |
| 67 | |
| 68 | %description -n osmo-gbproxy |
| 69 | The purpose of the Gb proxy is to aggregate the Gb links of multiple |
| 70 | BSS's and present them in one Gb link to the SGSN. |
| 71 | |
| 72 | %prep |
| 73 | %setup -q |
| 74 | |
| 75 | %build |
| 76 | echo "%{version}" >.tarball-version |
| 77 | autoreconf -fi |
| 78 | %configure \ |
| 79 | %if %{with_iu} |
| 80 | --enable-iu \ |
| 81 | %endif |
| 82 | --docdir=%{_docdir}/%{name} \ |
| 83 | --with-systemdsystemunitdir=%{_unitdir} |
| 84 | make %{?_smp_mflags} |
| 85 | |
| 86 | %install |
| 87 | %make_install |
| 88 | |
Oliver Smith | a40ccf6 | 2020-05-14 11:53:18 +0200 | [diff] [blame] | 89 | %if 0%{?suse_version} |
Oliver Smith | 1465bab | 2020-05-14 11:52:28 +0200 | [diff] [blame] | 90 | %preun %service_del_preun %{name}.service |
| 91 | %postun %service_del_postun %{name}.service |
| 92 | %pre %service_add_pre %{name}.service |
| 93 | %post %service_add_post %{name}.service |
| 94 | %preun -n osmo-gtphub %service_del_preun osmo-gtphub.service |
| 95 | %postun -n osmo-gtphub %service_del_postun osmo-gtphub.service |
| 96 | %pre -n osmo-gtphub %service_add_pre osmo-gtphub.service |
| 97 | %post -n osmo-gtphub %service_add_post osmo-gtphub.service |
| 98 | %preun -n osmo-gbproxy %service_del_preun osmo-gbproxy.service |
| 99 | %postun -n osmo-gbproxy %service_del_postun osmo-gbproxy.service |
| 100 | %pre -n osmo-gbproxy %service_add_pre osmo-gbproxy.service |
| 101 | %post -n osmo-gbproxy %service_add_post osmo-gbproxy.service |
Oliver Smith | a40ccf6 | 2020-05-14 11:53:18 +0200 | [diff] [blame] | 102 | %endif |
Oliver Smith | 1465bab | 2020-05-14 11:52:28 +0200 | [diff] [blame] | 103 | |
| 104 | %check |
| 105 | make %{?_smp_mflags} check || (find . -name testsuite.log -exec cat {} +) |
| 106 | |
| 107 | %files |
| 108 | %doc AUTHORS README |
| 109 | %dir %{_docdir}/%{name}/examples |
| 110 | %dir %{_docdir}/%{name}/examples/osmo-sgsn |
| 111 | %exclude %{_docdir}/%{name}/examples/osmo-gtphub |
| 112 | %exclude %{_docdir}/%{name}/examples/osmo-gbproxy |
| 113 | %{_docdir}/%{name}/examples/osmo-sgsn/osmo-sgsn-accept-all.cfg |
| 114 | %{_docdir}/%{name}/examples/osmo-sgsn/osmo-sgsn.cfg |
| 115 | %{_docdir}/%{name}/examples/osmo-sgsn/osmo-sgsn_custom-sccp.cfg |
| 116 | %{_bindir}/osmo-sgsn |
| 117 | %dir %{_sysconfdir}/osmocom |
Harald Welte | 7dd85f4 | 2020-06-22 15:20:33 +0200 | [diff] [blame] | 118 | %config(noreplace) %{_sysconfdir}/osmocom/osmo-sgsn.cfg |
Oliver Smith | 1465bab | 2020-05-14 11:52:28 +0200 | [diff] [blame] | 119 | %{_unitdir}/%{name}.service |
| 120 | |
| 121 | %files -n osmo-gtphub |
| 122 | %dir %{_docdir}/%{name}/examples |
| 123 | %dir %{_docdir}/%{name}/examples/osmo-gtphub |
| 124 | %{_docdir}/%{name}/examples/osmo-gtphub/osmo-gtphub-1iface.cfg |
| 125 | %{_docdir}/%{name}/examples/osmo-gtphub/osmo-gtphub.cfg |
| 126 | %{_bindir}/osmo-gtphub |
| 127 | %dir %{_sysconfdir}/osmocom |
Harald Welte | 7dd85f4 | 2020-06-22 15:20:33 +0200 | [diff] [blame] | 128 | %config(noreplace) %{_sysconfdir}/osmocom/osmo-gtphub.cfg |
Oliver Smith | 1465bab | 2020-05-14 11:52:28 +0200 | [diff] [blame] | 129 | %{_unitdir}/osmo-gtphub.service |
| 130 | |
| 131 | %files -n osmo-gbproxy |
| 132 | %dir %{_docdir}/%{name}/examples |
| 133 | %dir %{_docdir}/%{name}/examples/osmo-gbproxy |
| 134 | %{_docdir}/%{name}/examples/osmo-gbproxy/osmo-gbproxy-legacy.cfg |
| 135 | %{_docdir}/%{name}/examples/osmo-gbproxy/osmo-gbproxy.cfg |
| 136 | %{_bindir}/osmo-gbproxy |
| 137 | %dir %{_sysconfdir}/osmocom |
Harald Welte | 7dd85f4 | 2020-06-22 15:20:33 +0200 | [diff] [blame] | 138 | %config(noreplace) %{_sysconfdir}/osmocom/osmo-gbproxy.cfg |
Oliver Smith | 1465bab | 2020-05-14 11:52:28 +0200 | [diff] [blame] | 139 | %{_unitdir}/osmo-gbproxy.service |
| 140 | |
| 141 | %changelog |