Oliver Smith | 9d5fadc | 2020-05-14 11:49:52 +0200 | [diff] [blame] | 1 | # |
| 2 | # spec file for package osmo-pcap |
| 3 | # |
| 4 | # Copyright (c) 2015, Martin Hauke <mardnh@gmx.de> |
| 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 | 9d5fadc | 2020-05-14 11:49:52 +0200 | [diff] [blame] | 15 | Name: osmo-pcap |
Oliver Smith | fd387ec | 2020-05-14 11:50:15 +0200 | [diff] [blame^] | 16 | Version: @VERSION@ |
Oliver Smith | 9d5fadc | 2020-05-14 11:49:52 +0200 | [diff] [blame] | 17 | Release: 0 |
| 18 | Summary: Osmocom's PCAP client and server |
| 19 | License: AGPL-3.0-or-later AND GPL-2.0-or-later |
| 20 | Group: Productivity/Telephony/Servers |
| 21 | URL: https://osmocom.org/projects/osmo-pcap |
| 22 | Source: %{name}-%{version}.tar.xz |
| 23 | BuildRequires: autoconf |
| 24 | BuildRequires: automake >= 1.6 |
| 25 | BuildRequires: libpcap-devel |
| 26 | BuildRequires: libtool |
Oliver Smith | fd387ec | 2020-05-14 11:50:15 +0200 | [diff] [blame^] | 27 | %if 0%{?suse_version} |
| 28 | BuildRequires: systemd-rpm-macros |
| 29 | %endif |
Oliver Smith | 9d5fadc | 2020-05-14 11:49:52 +0200 | [diff] [blame] | 30 | BuildRequires: pkgconfig |
| 31 | BuildRequires: pkgconfig(gnutls) |
| 32 | BuildRequires: pkgconfig(libosmocore) >= 0.11.0 |
| 33 | BuildRequires: pkgconfig(libosmogb) |
| 34 | BuildRequires: pkgconfig(libosmogsm) >= 0.11.0 |
| 35 | BuildRequires: pkgconfig(libosmovty) >= 0.11.0 |
| 36 | BuildRequires: pkgconfig(libzmq) >= 3.2.2 |
Oliver Smith | fd387ec | 2020-05-14 11:50:15 +0200 | [diff] [blame^] | 37 | %{?systemd_requires} |
Oliver Smith | 9d5fadc | 2020-05-14 11:49:52 +0200 | [diff] [blame] | 38 | |
| 39 | %description |
| 40 | Osmocom tools to help with pcap tracing. |
| 41 | Run osmo_pcap_client locally and send traces to a different system. |
| 42 | |
| 43 | %prep |
| 44 | %setup -q |
| 45 | |
| 46 | %build |
| 47 | echo "%{version}" >.tarball-version |
| 48 | autoreconf -fi |
| 49 | %configure \ |
| 50 | --docdir=%{_docdir}/%{name} \ |
| 51 | --with-systemdsystemunitdir=%{_unitdir} |
| 52 | make %{?_smp_mflags} |
| 53 | |
| 54 | %install |
| 55 | %make_install |
| 56 | |
Oliver Smith | fd387ec | 2020-05-14 11:50:15 +0200 | [diff] [blame^] | 57 | %if 0%{?suse_version} |
Oliver Smith | 9d5fadc | 2020-05-14 11:49:52 +0200 | [diff] [blame] | 58 | %preun |
| 59 | %service_del_preun osmo-pcap-client.service osmo-pcap-server.service |
| 60 | |
| 61 | %postun |
| 62 | %service_del_postun osmo-pcap-client.service osmo-pcap-server.service |
| 63 | |
| 64 | %pre |
| 65 | %service_add_pre osmo-pcap-client.service osmo-pcap-server.service |
| 66 | |
| 67 | %post |
| 68 | %service_add_post osmo-pcap-client.service osmo-pcap-server.service |
Oliver Smith | fd387ec | 2020-05-14 11:50:15 +0200 | [diff] [blame^] | 69 | %endif |
Oliver Smith | 9d5fadc | 2020-05-14 11:49:52 +0200 | [diff] [blame] | 70 | |
| 71 | %check |
| 72 | make %{?_smp_mflags} check || (find . -name testsuite.log -exec cat {} +) |
| 73 | |
| 74 | %files |
| 75 | %license COPYING |
| 76 | %doc AUTHORS |
| 77 | %doc %{_docdir}/%{name}/examples |
| 78 | %dir %{_sysconfdir}/osmocom |
| 79 | %config(noreplace) %{_sysconfdir}/osmocom/osmo-pcap-client.cfg |
| 80 | %config(noreplace) %{_sysconfdir}/osmocom/osmo-pcap-server.cfg |
| 81 | %{_bindir}/osmo-pcap-client |
| 82 | %{_bindir}/osmo-pcap-server |
| 83 | %{_unitdir}/osmo-pcap-client.service |
| 84 | %{_unitdir}/osmo-pcap-server.service |
| 85 | %dir %{_datadir}/%{name} |
| 86 | %{_datadir}/%{name}/osmo_pcap_clean_old |
| 87 | |
| 88 | %changelog |