From d64b3e6a4eba4140c1fb46051cfa42e90d0dd572 Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Thu, 1 Apr 2021 17:15:35 -0400 Subject: [PATCH] Fix up build process for vtbufferd --- confluent_vtbufferd/buildrpm | 22 +++++++++++++++++++ .../confluent_vtbufferd.spec.tmpl | 6 +++++ 2 files changed, 28 insertions(+) create mode 100644 confluent_vtbufferd/buildrpm diff --git a/confluent_vtbufferd/buildrpm b/confluent_vtbufferd/buildrpm new file mode 100644 index 00000000..a7f1a4a0 --- /dev/null +++ b/confluent_vtbufferd/buildrpm @@ -0,0 +1,22 @@ +VERSION=`git describe|cut -d- -f 1` +NUMCOMMITS=`git describe|cut -d- -f 2` +if [ "$NUMCOMMITS" != "$VERSION" ]; then + VERSION=$VERSION.dev$NUMCOMMITS.g`git describe|cut -d- -f 3` +fi +mkdir -p dist/confluent_vtbufferd-$VERSION +cp *.c *.h Makefile dist/confluent_vtbufferd-$VERSION +cd dist +tar czvf confluent_vtbufferd-$VERSION.tar.gz confluent_vtbufferd-$VERSION +cd - +cp dist/confluent_vtbufferd-$VERSION.tar.gz ~/rpmbuild/SOURCES +sed -e 's/#VERSION#/'$VERSION/ confluent_vtbufferd.spec.tmpl > ~/rpmbuild/SPECS/confluent_vtbufferd.spec +rpmbuild -ba ~/rpmbuild/SPECS/confluent_vtbufferd.spec 2> /dev/null |grep ^Wrote: +if [ $? -ne 0 ]; then + echo "[ERROR] rpmbuild returned non-zero, run: rpmbuild -ba ~/rpmbuild/SPECS/$PKGNAME.spec" + exit 1 +else + # Clean up the generated files in this directory + rm -rf dist +fi + + diff --git a/confluent_vtbufferd/confluent_vtbufferd.spec.tmpl b/confluent_vtbufferd/confluent_vtbufferd.spec.tmpl index 4c8c1371..96446c9c 100644 --- a/confluent_vtbufferd/confluent_vtbufferd.spec.tmpl +++ b/confluent_vtbufferd/confluent_vtbufferd.spec.tmpl @@ -1,9 +1,12 @@ %define name confluent_vtbufferd %define version #VERSION# %define release 1 +%define debug_package %{nil} +%define _build_id_links none Summary: Console buffer manager for confluent Name: %{name} +Version: %{version} Release: %{release} Source0: %{name}-%{version}.tar.gz License: Apache2 @@ -29,6 +32,9 @@ modification, are permitted provided that the following conditions are met: * Neither the name of the copyright holder nor the names of contributors may be used to endorse or promote products derived from this software without specific prior written permission. +%prep +%setup -n %{name}-%{version} -n %{name}-%{version} + %build make