blob: 83a1ca72b1cb02e02af6b8bc8d58b8d75ef6d822 [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 Smith91d94102020-05-14 11:42:03 +020032BuildRequires: pkgconfig(libgtpnl) >= 1.0.0
33BuildRequires: pkgconfig(libmnl) >= 1.0.3
34BuildRequires: pkgconfig(libosmocore) >= 1.1.0
35BuildRequires: pkgconfig(libosmoctrl) >= 1.1.0
36BuildRequires: pkgconfig(libosmovty) >= 1.1.0
Oliver Smith77100802021-02-19 17:34:05 +010037BuildRequires: pkgconfig(libgtpnl) >= 1.2.0
Oliver Smith91d94102020-05-14 11:42:03 +020038Obsoletes: openggsn
39%{?systemd_requires}
40
41%description
42Osmo-GGSN is a C-language implementation of a GGSN (Gateway GPRS
43Support Node), a core network element of ETSI/3GPP cellular networks
44such as GPRS, EDGE, UMTS or HSPA.
45
46%package -n libgtp6
47Summary: Library implementing GTP between SGSN and GGSN
48License: GPL-2.0-only
49Group: System/Libraries
50
51%description -n libgtp6
52libgtp implements the GPRS Tunneling Protocol between SGSN and GGSN.
53
54%package -n libgtp-devel
55Summary: Development files for the GTP library
56License: GPL-2.0-only
57Group: Development/Libraries/C and C++
58Requires: libgtp6 = %{version}
59
60%description -n libgtp-devel
61libgtp implements the GPRS Tunneling Protocol between SGSN and GGSN.
62
63This subpackage contains libraries and header files for developing
64applications that want to make use of libgtp.
65
66%prep
67%setup -q
68
69%build
70echo "%{version}" >.tarball-version
71autoreconf -fi
72%configure \
Oliver Smith77100802021-02-19 17:34:05 +010073 --enable-gtp-linux \
Oliver Smith91d94102020-05-14 11:42:03 +020074 --disable-static \
75 --docdir="%{_docdir}/%{name}" \
76 --with-systemdsystemunitdir=%{_unitdir} \
77 --includedir="%{_includedir}/%{name}"
78make %{?_smp_mflags} V=1
79
80%install
81%make_install
82find %{buildroot} -type f -name "*.la" -delete -print
83
84%check
85make %{?_smp_mflags} check || (find . -name testsuite.log -exec cat {} +)
86
Oliver Smith569e46c2020-05-14 11:43:21 +020087%if 0%{?suse_version}
Oliver Smith91d94102020-05-14 11:42:03 +020088%pre
89%service_add_pre %{name}.service
90
91%post
92%service_add_post %{name}.service
93
94%preun
95%service_del_preun %{name}.service
96
97%postun
98%service_del_postun %{name}.service
Oliver Smith569e46c2020-05-14 11:43:21 +020099%endif
Oliver Smith91d94102020-05-14 11:42:03 +0200100
101%post -n libgtp6 -p /sbin/ldconfig
102%postun -n libgtp6 -p /sbin/ldconfig
103
104%files
105%license COPYING
106%doc AUTHORS README.md
107%{_bindir}/osmo-ggsn
108%{_bindir}/sgsnemu
109%{_mandir}/man8/osmo-ggsn.8%{?ext_man}
110%{_mandir}/man8/sgsnemu.8%{?ext_man}
111%{_unitdir}/%{name}.service
112%dir %{_docdir}/%{name}/examples
113%{_docdir}/%{name}/examples/osmo-ggsn.cfg
114%dir %{_sysconfdir}/osmocom
115%config(noreplace) %{_sysconfdir}/osmocom/osmo-ggsn.cfg
116
117%files -n libgtp6
118%{_libdir}/libgtp.so.6*
119
120%files -n libgtp-devel
121%{_includedir}/%{name}/
122%{_libdir}/libgtp.so
123%{_libdir}/pkgconfig/libgtp.pc
124
125%changelog