blob: 3c592e7593e3dd9553fb08797baa28ca9b99f289 [file] [log] [blame]
Oliver Smith482bb072020-05-14 11:52:28 +02001#
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
15# Please submit bugfixes or comments via http://bugs.opensuse.org/
16#
17
18
19## Disable LTO for now since it breaks compilation of the tests
20## https://osmocom.org/issues/4116
21%define _lto_cflags %{nil}
22
23%define with_iu 1
24Name: osmo-sgsn
25Version: 1.6.0.9
26Release: 0
27Summary: Osmocom's SGSN for 2G and 3G packet-switched mobile networks
28License: AGPL-3.0-or-later AND GPL-2.0-or-later
29Group: Productivity/Telephony/Servers
30URL: https://osmocom.org/projects/osmosgsn/wiki/OsmoSGSN
31Source: %{name}-%{version}.tar.xz
32BuildRequires: autoconf
33BuildRequires: automake
34BuildRequires: libtool
35BuildRequires: pkgconfig
36BuildRequires: systemd-rpm-macros
37BuildRequires: pkgconfig(libcares)
38BuildRequires: pkgconfig(libcrypto) >= 0.9.5
39BuildRequires: pkgconfig(libgtp) >= 1.4.0
40BuildRequires: pkgconfig(libosmo-gsup-client) >= 1.0.0
41BuildRequires: pkgconfig(libosmo-netif) >= 0.4.0
42BuildRequires: pkgconfig(libosmoabis) >= 0.6.0
43BuildRequires: pkgconfig(libosmocore) >= 1.2.0
44BuildRequires: pkgconfig(libosmoctrl) >= 1.2.0
45BuildRequires: pkgconfig(libosmogb) >= 1.2.0
46BuildRequires: pkgconfig(libosmogsm) >= 1.2.0
47BuildRequires: pkgconfig(libosmovty) >= 1.2.0
48%{?systemd_requires}
49%if %{with_iu}
50BuildRequires: pkgconfig(libasn1c)
51BuildRequires: pkgconfig(libosmo-ranap) >= 0.4.0
52BuildRequires: pkgconfig(libosmo-sigtran) >= 1.0.0
53%endif
54
55%description
56OsmoSGSN is Osmocom's Serving GPRS Support Node for 2G and 3G
57packet-switched mobile networks.
58
59%package -n osmo-gtphub
60Summary: Osmocom GTP Hub: Proxy for GTP traffic between multiple SGSNs and GGSNs
61Group: Productivity/Telephony/Servers
62
63%description -n osmo-gtphub
64Osmocom GTP Hub: Proxy for GTP traffic between multiple SGSNs and GGSNs.
65
66%package -n osmo-gbproxy
67Summary: Osmocom GPRS Gb Interface Proxy
68Group: Productivity/Telephony/Servers
69
70%description -n osmo-gbproxy
71The purpose of the Gb proxy is to aggregate the Gb links of multiple
72BSS's and present them in one Gb link to the SGSN.
73
74%prep
75%setup -q
76
77%build
78echo "%{version}" >.tarball-version
79autoreconf -fi
80%configure \
81%if %{with_iu}
82 --enable-iu \
83%endif
84 --docdir=%{_docdir}/%{name} \
85 --with-systemdsystemunitdir=%{_unitdir}
86make %{?_smp_mflags}
87
88%install
89%make_install
90
91%preun %service_del_preun %{name}.service
92%postun %service_del_postun %{name}.service
93%pre %service_add_pre %{name}.service
94%post %service_add_post %{name}.service
95%preun -n osmo-gtphub %service_del_preun osmo-gtphub.service
96%postun -n osmo-gtphub %service_del_postun osmo-gtphub.service
97%pre -n osmo-gtphub %service_add_pre osmo-gtphub.service
98%post -n osmo-gtphub %service_add_post osmo-gtphub.service
99%preun -n osmo-gbproxy %service_del_preun osmo-gbproxy.service
100%postun -n osmo-gbproxy %service_del_postun osmo-gbproxy.service
101%pre -n osmo-gbproxy %service_add_pre osmo-gbproxy.service
102%post -n osmo-gbproxy %service_add_post osmo-gbproxy.service
103
104%check
105make %{?_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
118%config %{_sysconfdir}/osmocom/osmo-sgsn.cfg
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
128%config %{_sysconfdir}/osmocom/osmo-gtphub.cfg
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
138%config %{_sysconfdir}/osmocom/osmo-gbproxy.cfg
139%{_unitdir}/osmo-gbproxy.service
140
141%changelog