blob: 0aa079a0a221d8fd0ffecb67f1bae391b011aff4 [file] [log] [blame]
Oliver Smith9d5fadc2020-05-14 11:49:52 +02001#
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 Smith9d5fadc2020-05-14 11:49:52 +020015Name: osmo-pcap
Oliver Smithfd387ec2020-05-14 11:50:15 +020016Version: @VERSION@
Oliver Smith9d5fadc2020-05-14 11:49:52 +020017Release: 0
18Summary: Osmocom's PCAP client and server
19License: AGPL-3.0-or-later AND GPL-2.0-or-later
20Group: Productivity/Telephony/Servers
21URL: https://osmocom.org/projects/osmo-pcap
22Source: %{name}-%{version}.tar.xz
23BuildRequires: autoconf
24BuildRequires: automake >= 1.6
25BuildRequires: libpcap-devel
26BuildRequires: libtool
Oliver Smithfd387ec2020-05-14 11:50:15 +020027%if 0%{?suse_version}
28BuildRequires: systemd-rpm-macros
29%endif
Oliver Smith9d5fadc2020-05-14 11:49:52 +020030BuildRequires: pkgconfig
31BuildRequires: pkgconfig(gnutls)
Pau Espin Pedrol88b5dc62023-09-12 15:50:49 +020032BuildRequires: pkgconfig(libosmocore) >= 1.9.0
33BuildRequires: pkgconfig(libosmogb) >= 1.9.0
34BuildRequires: pkgconfig(libosmogsm) >= 1.9.0
35BuildRequires: pkgconfig(libosmovty) >= 1.9.0
Oliver Smith9d5fadc2020-05-14 11:49:52 +020036BuildRequires: pkgconfig(libzmq) >= 3.2.2
Oliver Smithfd387ec2020-05-14 11:50:15 +020037%{?systemd_requires}
Oliver Smith9d5fadc2020-05-14 11:49:52 +020038
39%description
40Osmocom tools to help with pcap tracing.
41Run osmo_pcap_client locally and send traces to a different system.
42
43%prep
44%setup -q
45
46%build
47echo "%{version}" >.tarball-version
48autoreconf -fi
49%configure \
50 --docdir=%{_docdir}/%{name} \
51 --with-systemdsystemunitdir=%{_unitdir}
52make %{?_smp_mflags}
53
54%install
55%make_install
56
Oliver Smithfd387ec2020-05-14 11:50:15 +020057%if 0%{?suse_version}
Oliver Smith9d5fadc2020-05-14 11:49:52 +020058%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 Smithfd387ec2020-05-14 11:50:15 +020069%endif
Oliver Smith9d5fadc2020-05-14 11:49:52 +020070
71%check
72make %{?_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