2
0
mirror of https://github.com/xcat2/confluent.git synced 2024-11-24 02:20:08 +00:00

Fix up build process for vtbufferd

This commit is contained in:
Jarrod Johnson 2021-04-01 17:15:35 -04:00
parent 637e0f0a81
commit d64b3e6a4e
2 changed files with 28 additions and 0 deletions

View File

@ -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

View File

@ -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