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 | |
| 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 | |
| 23 | Name: osmo-ggsn |
| 24 | Version: 1.5.0.31 |
| 25 | Release: 0 |
| 26 | Summary: GPRS Support Node |
| 27 | License: GPL-2.0-only AND LGPL-2.1-or-later |
| 28 | Group: Productivity/Telephony/Servers |
| 29 | URL: https://osmocom.org/projects/openggsn/wiki/OsmoGGSN |
| 30 | Source: %{name}-%{version}.tar.xz |
| 31 | BuildRequires: libtool >= 2 |
| 32 | BuildRequires: pkgconfig >= 0.20 |
| 33 | BuildRequires: systemd-rpm-macros |
| 34 | BuildRequires: pkgconfig(libgtpnl) >= 1.0.0 |
| 35 | BuildRequires: pkgconfig(libmnl) >= 1.0.3 |
| 36 | BuildRequires: pkgconfig(libosmocore) >= 1.1.0 |
| 37 | BuildRequires: pkgconfig(libosmoctrl) >= 1.1.0 |
| 38 | BuildRequires: pkgconfig(libosmovty) >= 1.1.0 |
| 39 | Obsoletes: openggsn |
| 40 | %{?systemd_requires} |
| 41 | |
| 42 | %description |
| 43 | Osmo-GGSN is a C-language implementation of a GGSN (Gateway GPRS |
| 44 | Support Node), a core network element of ETSI/3GPP cellular networks |
| 45 | such as GPRS, EDGE, UMTS or HSPA. |
| 46 | |
| 47 | %package -n libgtp6 |
| 48 | Summary: Library implementing GTP between SGSN and GGSN |
| 49 | License: GPL-2.0-only |
| 50 | Group: System/Libraries |
| 51 | |
| 52 | %description -n libgtp6 |
| 53 | libgtp implements the GPRS Tunneling Protocol between SGSN and GGSN. |
| 54 | |
| 55 | %package -n libgtp-devel |
| 56 | Summary: Development files for the GTP library |
| 57 | License: GPL-2.0-only |
| 58 | Group: Development/Libraries/C and C++ |
| 59 | Requires: libgtp6 = %{version} |
| 60 | |
| 61 | %description -n libgtp-devel |
| 62 | libgtp implements the GPRS Tunneling Protocol between SGSN and GGSN. |
| 63 | |
| 64 | This subpackage contains libraries and header files for developing |
| 65 | applications that want to make use of libgtp. |
| 66 | |
| 67 | %prep |
| 68 | %setup -q |
| 69 | |
| 70 | %build |
| 71 | echo "%{version}" >.tarball-version |
| 72 | autoreconf -fi |
| 73 | %configure \ |
| 74 | --disable-static \ |
| 75 | --docdir="%{_docdir}/%{name}" \ |
| 76 | --with-systemdsystemunitdir=%{_unitdir} \ |
| 77 | --includedir="%{_includedir}/%{name}" |
| 78 | make %{?_smp_mflags} V=1 |
| 79 | |
| 80 | %install |
| 81 | %make_install |
| 82 | find %{buildroot} -type f -name "*.la" -delete -print |
| 83 | |
| 84 | %check |
| 85 | make %{?_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 |