Oliver Smith | 91d9410 | 2020-05-14 11:42:03 +0200 | [diff] [blame] | 1 | # |
| 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 Smith | 91d9410 | 2020-05-14 11:42:03 +0200 | [diff] [blame] | 15 | ## Disable LTO for now since it breaks compilation of the tests |
| 16 | ## https://osmocom.org/issues/4114 |
| 17 | %define _lto_cflags %{nil} |
| 18 | |
Oliver Smith | 91d9410 | 2020-05-14 11:42:03 +0200 | [diff] [blame] | 19 | Name: osmo-ggsn |
Oliver Smith | 569e46c | 2020-05-14 11:43:21 +0200 | [diff] [blame] | 20 | Version: @VERSION@ |
Oliver Smith | 91d9410 | 2020-05-14 11:42:03 +0200 | [diff] [blame] | 21 | Release: 0 |
| 22 | Summary: GPRS Support Node |
| 23 | License: GPL-2.0-only AND LGPL-2.1-or-later |
| 24 | Group: Productivity/Telephony/Servers |
Oliver Smith | 569e46c | 2020-05-14 11:43:21 +0200 | [diff] [blame] | 25 | URL: https://osmocom.org/projects/openggsn |
Oliver Smith | 91d9410 | 2020-05-14 11:42:03 +0200 | [diff] [blame] | 26 | Source: %{name}-%{version}.tar.xz |
| 27 | BuildRequires: libtool >= 2 |
| 28 | BuildRequires: pkgconfig >= 0.20 |
Oliver Smith | 569e46c | 2020-05-14 11:43:21 +0200 | [diff] [blame] | 29 | %if 0%{?suse_version} |
Oliver Smith | 91d9410 | 2020-05-14 11:42:03 +0200 | [diff] [blame] | 30 | BuildRequires: systemd-rpm-macros |
Oliver Smith | 569e46c | 2020-05-14 11:43:21 +0200 | [diff] [blame] | 31 | %endif |
Oliver Smith | 7710080 | 2021-02-19 17:34:05 +0100 | [diff] [blame] | 32 | BuildRequires: pkgconfig(libgtpnl) >= 1.2.0 |
Pau Espin Pedrol | 55fe62f | 2023-02-07 14:29:48 +0100 | [diff] [blame^] | 33 | BuildRequires: pkgconfig(libosmocore) >= 1.8.0 |
| 34 | BuildRequires: pkgconfig(libosmoctrl) >= 1.8.0 |
| 35 | BuildRequires: pkgconfig(libosmovty) >= 1.8.0 |
Oliver Smith | 91d9410 | 2020-05-14 11:42:03 +0200 | [diff] [blame] | 36 | Obsoletes: openggsn |
| 37 | %{?systemd_requires} |
| 38 | |
| 39 | %description |
| 40 | Osmo-GGSN is a C-language implementation of a GGSN (Gateway GPRS |
| 41 | Support Node), a core network element of ETSI/3GPP cellular networks |
| 42 | such as GPRS, EDGE, UMTS or HSPA. |
| 43 | |
| 44 | %package -n libgtp6 |
| 45 | Summary: Library implementing GTP between SGSN and GGSN |
| 46 | License: GPL-2.0-only |
| 47 | Group: System/Libraries |
| 48 | |
| 49 | %description -n libgtp6 |
| 50 | libgtp implements the GPRS Tunneling Protocol between SGSN and GGSN. |
| 51 | |
| 52 | %package -n libgtp-devel |
| 53 | Summary: Development files for the GTP library |
| 54 | License: GPL-2.0-only |
| 55 | Group: Development/Libraries/C and C++ |
| 56 | Requires: libgtp6 = %{version} |
| 57 | |
| 58 | %description -n libgtp-devel |
| 59 | libgtp implements the GPRS Tunneling Protocol between SGSN and GGSN. |
| 60 | |
| 61 | This subpackage contains libraries and header files for developing |
| 62 | applications that want to make use of libgtp. |
| 63 | |
Pau Espin Pedrol | ae81195 | 2021-09-23 13:34:20 +0200 | [diff] [blame] | 64 | %package -n gtp-echo-responder |
| 65 | Summary: Small program answering GTP ECHO Request with GTP ECHO Response |
| 66 | License: MIT |
| 67 | Group: System/Libraries |
| 68 | |
| 69 | %description -n gtp-echo-responder |
| 70 | Small program answering GTP ECHO Request with GTP ECHO Response for both GTPCv1 |
| 71 | and GTPCv2. |
| 72 | |
Oliver Smith | 91d9410 | 2020-05-14 11:42:03 +0200 | [diff] [blame] | 73 | %prep |
| 74 | %setup -q |
| 75 | |
| 76 | %build |
| 77 | echo "%{version}" >.tarball-version |
| 78 | autoreconf -fi |
| 79 | %configure \ |
Oliver Smith | 7710080 | 2021-02-19 17:34:05 +0100 | [diff] [blame] | 80 | --enable-gtp-linux \ |
Oliver Smith | 91d9410 | 2020-05-14 11:42:03 +0200 | [diff] [blame] | 81 | --disable-static \ |
| 82 | --docdir="%{_docdir}/%{name}" \ |
| 83 | --with-systemdsystemunitdir=%{_unitdir} \ |
| 84 | --includedir="%{_includedir}/%{name}" |
| 85 | make %{?_smp_mflags} V=1 |
| 86 | |
| 87 | %install |
| 88 | %make_install |
| 89 | find %{buildroot} -type f -name "*.la" -delete -print |
| 90 | |
| 91 | %check |
| 92 | make %{?_smp_mflags} check || (find . -name testsuite.log -exec cat {} +) |
| 93 | |
Oliver Smith | 569e46c | 2020-05-14 11:43:21 +0200 | [diff] [blame] | 94 | %if 0%{?suse_version} |
Oliver Smith | 91d9410 | 2020-05-14 11:42:03 +0200 | [diff] [blame] | 95 | %pre |
| 96 | %service_add_pre %{name}.service |
| 97 | |
| 98 | %post |
| 99 | %service_add_post %{name}.service |
| 100 | |
| 101 | %preun |
| 102 | %service_del_preun %{name}.service |
| 103 | |
| 104 | %postun |
| 105 | %service_del_postun %{name}.service |
Oliver Smith | 569e46c | 2020-05-14 11:43:21 +0200 | [diff] [blame] | 106 | %endif |
Oliver Smith | 91d9410 | 2020-05-14 11:42:03 +0200 | [diff] [blame] | 107 | |
| 108 | %post -n libgtp6 -p /sbin/ldconfig |
| 109 | %postun -n libgtp6 -p /sbin/ldconfig |
| 110 | |
| 111 | %files |
| 112 | %license COPYING |
| 113 | %doc AUTHORS README.md |
| 114 | %{_bindir}/osmo-ggsn |
| 115 | %{_bindir}/sgsnemu |
| 116 | %{_mandir}/man8/osmo-ggsn.8%{?ext_man} |
| 117 | %{_mandir}/man8/sgsnemu.8%{?ext_man} |
| 118 | %{_unitdir}/%{name}.service |
| 119 | %dir %{_docdir}/%{name}/examples |
Oliver Smith | 9d82492 | 2021-03-01 14:41:46 +0100 | [diff] [blame] | 120 | %{_docdir}/%{name}/examples/osmo-ggsn-kernel-gtp.cfg |
Oliver Smith | 91d9410 | 2020-05-14 11:42:03 +0200 | [diff] [blame] | 121 | %{_docdir}/%{name}/examples/osmo-ggsn.cfg |
Oliver Smith | 303aeea | 2021-03-01 14:25:30 +0100 | [diff] [blame] | 122 | %{_docdir}/%{name}/examples/sgsnemu.conf |
Oliver Smith | 91d9410 | 2020-05-14 11:42:03 +0200 | [diff] [blame] | 123 | %dir %{_sysconfdir}/osmocom |
| 124 | %config(noreplace) %{_sysconfdir}/osmocom/osmo-ggsn.cfg |
| 125 | |
| 126 | %files -n libgtp6 |
| 127 | %{_libdir}/libgtp.so.6* |
| 128 | |
| 129 | %files -n libgtp-devel |
| 130 | %{_includedir}/%{name}/ |
| 131 | %{_libdir}/libgtp.so |
| 132 | %{_libdir}/pkgconfig/libgtp.pc |
| 133 | |
Pau Espin Pedrol | ae81195 | 2021-09-23 13:34:20 +0200 | [diff] [blame] | 134 | %files -n gtp-echo-responder |
| 135 | %{_bindir}/gtp-echo-responder |
| 136 | |
Oliver Smith | 91d9410 | 2020-05-14 11:42:03 +0200 | [diff] [blame] | 137 | %changelog |