File tree 1 file changed +3
-6
lines changed
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 )"
5
5
version=$( grep KEYDB_REAL_VERSION $DIR /../../src/version.h | awk ' { printf $3 }' | tr -d \" )
6
6
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
7
7
arch=$( 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}' )
12
9
13
10
if [[ " $arch " != " aarch64" ]] && [[ " $arch " != " x86_64" ]]; then
14
11
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
39
36
sed -i ' 3d' $DIR /keydb_build/keydb.spec
40
37
sed -i -E " 2a\Release : $release %{?dist}" $DIR /keydb_build/keydb.spec
41
38
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 /
44
41
rpmbuild -bb $DIR /keydb_build/keydb.spec
45
42
mv /root/rpmbuild/RPMS/$arch /* $DIR /rpm_files_generated
46
43
You can’t perform that action at this time.
0 commit comments