blob: 15e414495d0c6124313ee14906d3366beb7fb094 [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
15# Please submit bugfixes or comments via http://bugs.opensuse.org/
16#
17
18## Disable LTO for now since it breaks compilation of the tests
19## https://osmocom.org/issues/4114
20%define _lto_cflags %{nil}
21
22
23Name: osmo-ggsn
24Version: 1.5.0.31
25Release: 0
26Summary: GPRS Support Node
27License: GPL-2.0-only AND LGPL-2.1-or-later
28Group: Productivity/Telephony/Servers
29URL: https://osmocom.org/projects/openggsn/wiki/OsmoGGSN
30Source: %{name}-%{version}.tar.xz
31BuildRequires: libtool >= 2
32BuildRequires: pkgconfig >= 0.20
33BuildRequires: systemd-rpm-macros
34BuildRequires: pkgconfig(libgtpnl) >= 1.0.0
35BuildRequires: pkgconfig(libmnl) >= 1.0.3
36BuildRequires: pkgconfig(libosmocore) >= 1.1.0
37BuildRequires: pkgconfig(libosmoctrl) >= 1.1.0
38BuildRequires: pkgconfig(libosmovty) >= 1.1.0
39Obsoletes: openggsn
40%{?systemd_requires}
41
42%description
43Osmo-GGSN is a C-language implementation of a GGSN (Gateway GPRS
44Support Node), a core network element of ETSI/3GPP cellular networks
45such as GPRS, EDGE, UMTS or HSPA.
46
47%package -n libgtp6
48Summary: Library implementing GTP between SGSN and GGSN
49License: GPL-2.0-only
50Group: System/Libraries
51
52%description -n libgtp6
53libgtp implements the GPRS Tunneling Protocol between SGSN and GGSN.
54
55%package -n libgtp-devel
56Summary: Development files for the GTP library
57License: GPL-2.0-only
58Group: Development/Libraries/C and C++
59Requires: libgtp6 = %{version}
60
61%description -n libgtp-devel
62libgtp implements the GPRS Tunneling Protocol between SGSN and GGSN.
63
64This subpackage contains libraries and header files for developing
65applications that want to make use of libgtp.
66
67%prep
68%setup -q
69
70%build
71echo "%{version}" >.tarball-version
72autoreconf -fi
73%configure \
74 --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
87%pre
88%service_add_pre %{name}.service
89
90%post
91%service_add_post %{name}.service
92
93%preun
94%service_del_preun %{name}.service
95
96%postun
97%service_del_postun %{name}.service
98
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