fix rpmbuild dirs

Former-commit-id: 2cf077e6d3bc98cf75120185c7985030b0aa4040
This commit is contained in:
Ben Schermel 2020-05-27 14:06:22 -04:00 committed by John Sully
parent 8925d8c51d
commit 0a7243de3c

View File

@ -2,7 +2,7 @@
### usage sudo ./generate_rpms
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
version=$(grep KEYDB_REAL_VERSION ../../src/version.h | awk '{ printf $3 }' | tr -d \")
version=$(grep KEYDB_REAL_VERSION $DIR/../../src/version.h | awk '{ printf $3 }' | tr -d \")
release=1 # by default this will always be 1 for keydb version structure. If build release version needs to be update you can modify here
arch=$(uname -m)
dist=el$(rpm -q --queryformat '%{VERSION}' centos-release)
@ -32,7 +32,7 @@ sed -i -E "2a\Release : $release%{?dist}" $DIR/keydb_build/keydb.spec
# yum install -y scl-utils centos-release-scl rpm-build
mkdir -p /root/rpmbuild/BUILDROOT/keydb-pro-$version-$release.$dist.$arch
cp -r ./keydb_build/keydb_rpm/* /root/rpmbuild/BUILDROOT/keydb-pro-$version-$release.$dist.$arch/
cp -r $DIR/keydb_build/keydb_rpm/* /root/rpmbuild/BUILDROOT/keydb-pro-$version-$release.$dist.$arch/
rpmbuild -bb $DIR/keydb_build/keydb.spec
mv /root/rpmbuild/RPMS/$arch/* $DIR/rpm_files_generated