blob: dcf0e7caecefe9b2efe1d4f86c92f4235e9ef7b4 [file] [log] [blame]
Oliver Smith91d94102020-05-14 11:42:03 +02001#
2# spec file for package osmo-ggsn
3#
4# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
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 Smith91d94102020-05-14 11:42:03 +020015## Disable LTO for now since it breaks compilation of the tests
16## https://osmocom.org/issues/4114
17%define _lto_cflags %{nil}
18
Oliver Smith91d94102020-05-14 11:42:03 +020019Name: osmo-ggsn
Oliver Smith569e46c2020-05-14 11:43:21 +020020Version: @VERSION@
Oliver Smith91d94102020-05-14 11:42:03 +020021Release: 0
22Summary: GPRS Support Node
23License: GPL-2.0-only AND LGPL-2.1-or-later
24Group: Productivity/Telephony/Servers
Oliver Smith569e46c2020-05-14 11:43:21 +020025URL: https://osmocom.org/projects/openggsn
Oliver Smith91d94102020-05-14 11:42:03 +020026Source: %{name}-%{version}.tar.xz
27BuildRequires: libtool >= 2
28BuildRequires: pkgconfig >= 0.20
Oliver Smith569e46c2020-05-14 11:43:21 +020029%if 0%{?suse_version}
Oliver Smith91d94102020-05-14 11:42:03 +020030BuildRequires: systemd-rpm-macros
Oliver Smith569e46c2020-05-14 11:43:21 +020031%endif
Oliver Smith77100802021-02-19 17:34:05 +010032BuildRequires: pkgconfig(libgtpnl) >= 1.2.0
Pau Espin Pedrolb1f641b2021-02-23 13:34:39 +010033BuildRequires: pkgconfig(libosmocore) >= 1.5.0
34BuildRequires: pkgconfig(libosmoctrl) >= 1.5.0
35BuildRequires: pkgconfig(libosmovty) >= 1.5.0
Oliver Smith91d94102020-05-14 11:42:03 +020036Obsoletes: openggsn
37%{?systemd_requires}
38
39%description
40Osmo-GGSN is a C-language implementation of a GGSN (Gateway GPRS
41Support Node), a core network element of ETSI/3GPP cellular networks
42such as GPRS, EDGE, UMTS or HSPA.
43
44%package -n libgtp6
45Summary: Library implementing GTP between SGSN and GGSN
46License: GPL-2.0-only
47Group: System/Libraries
48
49%description -n libgtp6
50libgtp implements the GPRS Tunneling Protocol between SGSN and GGSN.
51
52%package -n libgtp-devel
53Summary: Development files for the GTP library
54License: GPL-2.0-only
55Group: Development/Libraries/C and C++
56Requires: libgtp6 = %{version}
57
58%description -n libgtp-devel
59libgtp implements the GPRS Tunneling Protocol between SGSN and GGSN.
60
61This subpackage contains libraries and header files for developing
62applications that want to make use of libgtp.
63
64%prep
65%setup -q
66
67%build
68echo "%{version}" >.tarball-version
69autoreconf -fi
70%configure \
Oliver Smith77100802021-02-19 17:34:05 +010071 --enable-gtp-linux \
Oliver Smith91d94102020-05-14 11:42:03 +020072 --disable-static \
73 --docdir="%{_docdir}/%{name}" \
74 --with-systemdsystemunitdir=%{_unitdir} \
75 --includedir="%{_includedir}/%{name}"
76make %{?_smp_mflags} V=1
77
78%install
79%make_install
80find %{buildroot} -type f -name "*.la" -delete -print
81
82%check
83make %{?_smp_mflags} check || (find . -name testsuite.log -exec cat {} +)
84
Oliver Smith569e46c2020-05-14 11:43:21 +020085%if 0%{?suse_version}
Oliver Smith91d94102020-05-14 11:42:03 +020086%pre
87%service_add_pre %{name}.service
88
89%post
90%service_add_post %{name}.service
91
92%preun
93%service_del_preun %{name}.service
94
95%postun
96%service_del_postun %{name}.service
Oliver Smith569e46c2020-05-14 11:43:21 +020097%endif
Oliver Smith91d94102020-05-14 11:42:03 +020098
99%post -n libgtp6 -p /sbin/ldconfig
100%postun -n libgtp6 -p /sbin/ldconfig
101
102%files
103%license COPYING
104%doc AUTHORS README.md
105%{_bindir}/osmo-ggsn
106%{_bindir}/sgsnemu
107%{_mandir}/man8/osmo-ggsn.8%{?ext_man}
108%{_mandir}/man8/sgsnemu.8%{?ext_man}
109%{_unitdir}/%{name}.service
110%dir %{_docdir}/%{name}/examples
111%{_docdir}/%{name}/examples/osmo-ggsn.cfg
112%dir %{_sysconfdir}/osmocom
113%config(noreplace) %{_sysconfdir}/osmocom/osmo-ggsn.cfg
114
115%files -n libgtp6
116%{_libdir}/libgtp.so.6*
117
118%files -n libgtp-devel
119%{_includedir}/%{name}/
120%{_libdir}/libgtp.so
121%{_libdir}/pkgconfig/libgtp.pc
122
123%changelog