Skip to content

Commit 94acd43

Browse files
benschermelJohnSully
authored andcommitted
fix rpmbuild dirs
1 parent 14bdd74 commit 94acd43

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

pkg/rpm/generate_rpms.sh

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
### usage sudo ./generate_rpms
44
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
5-
version=$(grep KEYDB_REAL_VERSION ../../src/version.h | awk '{ printf $3 }' | tr -d \")
5+
version=$(grep KEYDB_REAL_VERSION $DIR/../../src/version.h | awk '{ printf $3 }' | tr -d \")
66
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
77
arch=$(uname -m)
88
dist=el$(rpm -q --queryformat '%{VERSION}' centos-release | cut -d. -f1)
@@ -30,10 +30,9 @@ sed -i -E "1a\Version : $version" $DIR/keydb_build/keydb.spec
3030
sed -i '3d' $DIR/keydb_build/keydb.spec
3131
sed -i -E "2a\Release : $release%{?dist}" $DIR/keydb_build/keydb.spec
3232

33-
# yum install -y scl-utils centos-release-scl rpm-build
3433
mkdir -p /root/rpmbuild/BUILDROOT/keydb-$version-$release.$dist.$arch
35-
cp -r ./keydb_build/keydb_rpm/* /root/rpmbuild/BUILDROOT/keydb-$version-$release.$dist.$arch/
36-
rpmbuild -bb /keydb_build/keydb.spec
34+
cp -r $DIR/keydb_build/keydb_rpm/* /root/rpmbuild/BUILDROOT/keydb-$version-$release.$dist.$arch/
35+
rpmbuild -bb $DIR/keydb_build/keydb.spec
3736
mv /root/rpmbuild/RPMS/$arch/* $DIR/rpm_files_generated
3837

3938
exit

0 commit comments

Comments
 (0)