提交 93b8151e 编写于 作者: H haozi007

update spec for rpmbuild

Signed-off-by: Nhaozi007 <liuhao27@huawei.com>
上级 b00e6bcd
%global _version 1.0.0 %global _version 1.0.0
%global _release 20200519.220857.git3a7aa4a4 %global _release 20200519.232137.git3c321b3c
Name: isula_libutils Name: iSula-libutils
Version: %{_version} Version: %{_version}
Release: %{_release} Release: %{_release}
Summary: Provide json parse and log common functions Summary: Provide json parse and log common functions
Group: System Environment/Libraries Group: System Environment/Libraries
License: LGPLv2.1+ License: LGPLv2.1+
URL: iSula_libutils URL: iSula-libutils
Source0: %{name}-1.0.tar.gz Source0: %{name}-1.0.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version} BuildRoot: %{_tmppath}/%{name}-%{version}
...@@ -17,7 +17,7 @@ BuildRequires: zlib-devel yajl-devel gtest-devel ...@@ -17,7 +17,7 @@ BuildRequires: zlib-devel yajl-devel gtest-devel
Requires: yajl zlib Requires: yajl zlib
%ifarch x86_64 aarch64 %ifarch x86_64 aarch64
Provides: lib%{name}.so()(64bit) Provides: libisula_libutils.so()(64bit)
%endif %endif
%description %description
...@@ -72,7 +72,7 @@ rm -rf %{buildroot} ...@@ -72,7 +72,7 @@ rm -rf %{buildroot}
%files %files
%defattr(-,root,root,-) %defattr(-,root,root,-)
%{_libdir}/lib%{name}.so* %{_libdir}/libisula_libutils.so*
%files devel %files devel
%defattr(-,root,root,-) %defattr(-,root,root,-)
......
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
# usage # usage
# ./update-version.bash # ./update-version.bash
topDir=$(git rev-parse --show-toplevel) topDir=$(git rev-parse --show-toplevel)
specfile="${topDir}/isula_libutils.spec" specfile="${topDir}/iSula-libutils.spec"
CMakefile="${topDir}/CMakeLists.txt" CMakefile="${topDir}/CMakeLists.txt"
old_version=$(cat ${specfile} | grep "%global" | grep "_version" | awk {'print $3'}) old_version=$(cat ${specfile} | grep "%global" | grep "_version" | awk {'print $3'})
first_old_version=$(cat ${specfile} | grep "%global" | grep "_version" | awk {'print $3'} | awk -F "." {'print $1'}) first_old_version=$(cat ${specfile} | grep "%global" | grep "_version" | awk {'print $3'} | awk -F "." {'print $1'})
...@@ -57,7 +57,7 @@ commit_id_long=`git log --pretty=oneline -1 | awk {'print $1'}` ...@@ -57,7 +57,7 @@ commit_id_long=`git log --pretty=oneline -1 | awk {'print $1'}`
commit_id=${commit_id_long:0:8} commit_id=${commit_id_long:0:8}
new_release=`date "+%Y%m%d"`.`date "+%H%M%S"`.git$commit_id new_release=`date "+%Y%m%d"`.`date "+%H%M%S"`.git$commit_id
echo "The relase version has been modified, it is ${new_release}" echo "The relase version has been modified, it is ${new_release}"
sed -i "s/set(CLIBCNI_VERSION \"${old_version}\")/set(CLIBCNI_VERSION \"${new_version}\")/g" ${CMakefile} sed -i "s/set(ISULA_LIBUTILS_VERSION \"${old_version}\")/set(ISULA_LIBUTILS_VERSION \"${new_version}\")/g" ${CMakefile}
sed -i "s/^\%global _version ${old_version}$/\%global _version ${new_version}/g" ${specfile} sed -i "s/^\%global _version ${old_version}$/\%global _version ${new_version}/g" ${specfile}
sed -i "s/^\%global _release ${old_release}$/\%global _release ${new_release}/g" ${specfile} sed -i "s/^\%global _release ${old_release}$/\%global _release ${new_release}/g" ${specfile}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册