File tree Expand file tree Collapse file tree 1 file changed +3
-6
lines changed
Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Original file line number Diff line number Diff line change @@ -5,10 +5,7 @@ DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
55version=$( grep KEYDB_REAL_VERSION $DIR /../../src/version.h | awk ' { printf $3 }' | tr -d \" )
66release=1 # by default this will always be 1 for keydb version structure. If build release version needs to be update you can modify here
77arch=$( uname -m)
8- dist=el$( rpm -q --queryformat ' %{VERSION}' centos-release | cut -d. -f1)
9- if [[ " $dist " == " elpackage centos-release is not installed" ]]; then
10- dist=el$( rpm -q --queryformat ' %{VERSION}' centos-linux-release | cut -d. -f1)
11- fi
8+ dist=$( rpm --eval ' %{?dist}' )
129
1310if [[ " $arch " != " aarch64" ]] && [[ " $arch " != " x86_64" ]]; then
1411 echo " This script is only valid and tested for aarch64 and x86_64 architectures. You are trying to use: $arch "
@@ -39,8 +36,8 @@ sed -i -E "1a\Version : $version" $DIR/keydb_build/keydb.spec
3936sed -i ' 3d' $DIR /keydb_build/keydb.spec
4037sed -i -E " 2a\Release : $release %{?dist}" $DIR /keydb_build/keydb.spec
4138
42- mkdir -p /root/rpmbuild/BUILDROOT/keydb-$version -$release . $dist .$arch
43- cp -r $DIR /keydb_build/keydb_rpm/* /root/rpmbuild/BUILDROOT/keydb-$version -$release . $dist .$arch /
39+ mkdir -p /root/rpmbuild/BUILDROOT/keydb-$version -$release$dist .$arch
40+ cp -r $DIR /keydb_build/keydb_rpm/* /root/rpmbuild/BUILDROOT/keydb-$version -$release$dist .$arch /
4441rpmbuild -bb $DIR /keydb_build/keydb.spec
4542mv /root/rpmbuild/RPMS/$arch /* $DIR /rpm_files_generated
4643
You can’t perform that action at this time.
0 commit comments