From c10cb81593230269cbc3f23244d8e3fb43b1f465 Mon Sep 17 00:00:00 2001 From: Oliver Smith Date: Thu, 14 May 2020 11:51:10 +0200 Subject: [PATCH] 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: Idfe04c2e2609763387d1309f059c390b8e7ae938 --- .gitignore | 2 ++ configure.ac | 1 + contrib/{osmo-pcu.spec => osmo-pcu.spec.in} | 12 ++++++------ 3 files changed, 9 insertions(+), 6 deletions(-) rename contrib/{osmo-pcu.spec => osmo-pcu.spec.in} (92%) diff --git a/.gitignore b/.gitignore index c309e961..58be63b8 100644 --- a/.gitignore +++ b/.gitignore @@ -64,3 +64,5 @@ doc/manuals/generated/ doc/manuals/osmomsc-usermanual.xml doc/manuals/common doc/manuals/build + +contrib/osmo-pcu.spec diff --git a/configure.ac b/configure.ac index d693c673..3d126ce5 100644 --- a/configure.ac +++ b/configure.ac @@ -256,4 +256,5 @@ AC_OUTPUT( doc/manuals/Makefile contrib/Makefile contrib/systemd/Makefile + contrib/osmo-pcu.spec Makefile) diff --git a/contrib/osmo-pcu.spec b/contrib/osmo-pcu.spec.in similarity index 92% rename from contrib/osmo-pcu.spec rename to contrib/osmo-pcu.spec.in index 0232b32f..e197cb7a 100644 --- a/contrib/osmo-pcu.spec +++ b/contrib/osmo-pcu.spec.in @@ -12,24 +12,22 @@ # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. -# Please submit bugfixes or comments via http://bugs.opensuse.org/ -# - - Name: osmo-pcu -Version: 0.8.0.126 +Version: @VERSION@ Release: 0 Summary: Osmocom GPRS Packet Control Unit (PCU) License: GPL-2.0-only Group: Productivity/Telephony/Servers -URL: https://osmocom.org/projects/osmopcu/wiki/OsmoPCU +URL: https://osmocom.org/projects/osmopcu Source: %{name}-%{version}.tar.xz BuildRequires: autoconf BuildRequires: automake BuildRequires: gcc-c++ BuildRequires: libtool BuildRequires: pkgconfig >= 0.20 +%if 0%{?suse_version} BuildRequires: systemd-rpm-macros +%endif BuildRequires: pkgconfig(libosmocore) >= 1.1.0 BuildRequires: pkgconfig(libosmogb) >= 1.1.0 BuildRequires: pkgconfig(libosmogsm) >= 1.1.0 @@ -55,6 +53,7 @@ make %{?_smp_mflags} %install %make_install +%if 0%{?suse_version} %preun %service_del_preun %{name}.service @@ -66,6 +65,7 @@ make %{?_smp_mflags} %post %service_add_post %{name}.service +%endif %check make %{?_smp_mflags} check || (find . -name testsuite.log -exec cat {} +)