contrib: integrate RPM spec

Remove OpenSUSE bug report link, set version to @VERSION@, make it build
with CentOS 8 etc.

Related: OS#4550
Change-Id: I7ac5f2c6bf11d88a3ebbc2f17d963d26f0b7de13
This commit is contained in:
Oliver Smith 2020-05-14 11:50:15 +02:00
parent 9d5fadcc79
commit fd387ecec3
3 changed files with 10 additions and 4 deletions

2
.gitignore vendored
View File

@ -35,3 +35,5 @@ tests/atconfig
tests/package.m4 tests/package.m4
tests/testsuite tests/testsuite
tests/testsuite.log tests/testsuite.log
contrib/osmo-pcap.spec

View File

@ -145,6 +145,7 @@ AC_OUTPUT(
src/Makefile src/Makefile
contrib/Makefile contrib/Makefile
contrib/systemd/Makefile contrib/systemd/Makefile
contrib/osmo-pcap.spec
doc/Makefile doc/Makefile
doc/examples/Makefile doc/examples/Makefile
tests/Makefile tests/Makefile

View File

@ -12,11 +12,8 @@
# license that conforms to the Open Source Definition (Version 1.9) # license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative. # published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
Name: osmo-pcap Name: osmo-pcap
Version: 0.1.2.0 Version: @VERSION@
Release: 0 Release: 0
Summary: Osmocom's PCAP client and server Summary: Osmocom's PCAP client and server
License: AGPL-3.0-or-later AND GPL-2.0-or-later License: AGPL-3.0-or-later AND GPL-2.0-or-later
@ -27,6 +24,9 @@ BuildRequires: autoconf
BuildRequires: automake >= 1.6 BuildRequires: automake >= 1.6
BuildRequires: libpcap-devel BuildRequires: libpcap-devel
BuildRequires: libtool BuildRequires: libtool
%if 0%{?suse_version}
BuildRequires: systemd-rpm-macros
%endif
BuildRequires: pkgconfig BuildRequires: pkgconfig
BuildRequires: pkgconfig(gnutls) BuildRequires: pkgconfig(gnutls)
BuildRequires: pkgconfig(libosmocore) >= 0.11.0 BuildRequires: pkgconfig(libosmocore) >= 0.11.0
@ -34,6 +34,7 @@ BuildRequires: pkgconfig(libosmogb)
BuildRequires: pkgconfig(libosmogsm) >= 0.11.0 BuildRequires: pkgconfig(libosmogsm) >= 0.11.0
BuildRequires: pkgconfig(libosmovty) >= 0.11.0 BuildRequires: pkgconfig(libosmovty) >= 0.11.0
BuildRequires: pkgconfig(libzmq) >= 3.2.2 BuildRequires: pkgconfig(libzmq) >= 3.2.2
%{?systemd_requires}
%description %description
Osmocom tools to help with pcap tracing. Osmocom tools to help with pcap tracing.
@ -53,6 +54,7 @@ make %{?_smp_mflags}
%install %install
%make_install %make_install
%if 0%{?suse_version}
%preun %preun
%service_del_preun osmo-pcap-client.service osmo-pcap-server.service %service_del_preun osmo-pcap-client.service osmo-pcap-server.service
@ -64,6 +66,7 @@ make %{?_smp_mflags}
%post %post
%service_add_post osmo-pcap-client.service osmo-pcap-server.service %service_add_post osmo-pcap-client.service osmo-pcap-server.service
%endif
%check %check
make %{?_smp_mflags} check || (find . -name testsuite.log -exec cat {} +) make %{?_smp_mflags} check || (find . -name testsuite.log -exec cat {} +)