build: 打包完成输出文件目录
This commit is contained in:
19
build.sh
19
build.sh
@@ -28,8 +28,6 @@ fi
|
|||||||
# Use a new parameter list
|
# Use a new parameter list
|
||||||
set -- "${new_args[@]}"
|
set -- "${new_args[@]}"
|
||||||
|
|
||||||
ProjectL=omc
|
|
||||||
ProjectU=OMC
|
|
||||||
VERSION=2.2407.1
|
VERSION=2.2407.1
|
||||||
RelDate=`date +%Y%m%d`
|
RelDate=`date +%Y%m%d`
|
||||||
RelVer=${VERSION}-${RelDate}
|
RelVer=${VERSION}-${RelDate}
|
||||||
@@ -56,6 +54,7 @@ case "${pkgtype}" in
|
|||||||
# 还原打包目录
|
# 还原打包目录
|
||||||
rm -rf ${RpmBuildDir}
|
rm -rf ${RpmBuildDir}
|
||||||
git checkout .
|
git checkout .
|
||||||
|
git pull
|
||||||
cp -rf ${SystemDir}/* ${RpmBuildDir}/BUILD
|
cp -rf ${SystemDir}/* ${RpmBuildDir}/BUILD
|
||||||
cp -rf ${RpmBuildDirOMC}/etc/db/common/* ${RpmBuildDirOMC}/etc/db/install
|
cp -rf ${RpmBuildDirOMC}/etc/db/common/* ${RpmBuildDirOMC}/etc/db/install
|
||||||
cp -rf ${RpmBuildDirOMC}/etc/db/common/* ${RpmBuildDirOMC}/etc/db/upgrade
|
cp -rf ${RpmBuildDirOMC}/etc/db/common/* ${RpmBuildDirOMC}/etc/db/upgrade
|
||||||
@@ -78,13 +77,15 @@ case "${pkgtype}" in
|
|||||||
cd ${EmsBEDir}
|
cd ${EmsBEDir}
|
||||||
chmod 755 ${RpmBuildDir}
|
chmod 755 ${RpmBuildDir}
|
||||||
chmod 755 ${RpmBuildDirOMC}
|
chmod 755 ${RpmBuildDirOMC}
|
||||||
DebPkgFile=omc-r${RelVer}-ky10-nms_cxy.rpm
|
|
||||||
rpmbuild -bb -D "_topdir ${RpmBuildDir}" ${RpmBuildDir}/SPECS/omc.spec
|
rpmbuild -bb -D "_topdir ${RpmBuildDir}" ${RpmBuildDir}/SPECS/omc.spec
|
||||||
|
|
||||||
|
RpmPkgFile=${RpmReleaseDebsDir}/omc-r${RelVer}-ky10.rpm
|
||||||
|
mv ${RpmBuildDir}/RPMS/aarch64/omc-${RelVer}-ky10.aarch64.rpm ${RpmBuildDir}
|
||||||
|
|
||||||
# 生成MD5文件
|
# 生成MD5文件
|
||||||
cd $RpmReleaseDebsDir
|
|
||||||
rm -f omc-md5sum.txt
|
rm -f omc-md5sum.txt
|
||||||
md5sum ${RpmReleaseDebsDir}/${DebPkgFile} >omc-md5sum.txt
|
md5sum ${RpmBuildDir} >omc-md5sum.txt
|
||||||
|
echo ${RpmBuildDir}
|
||||||
;;
|
;;
|
||||||
deb)
|
deb)
|
||||||
# 还原打包目录
|
# 还原打包目录
|
||||||
@@ -115,13 +116,13 @@ case "${pkgtype}" in
|
|||||||
chmod 755 ${DebBuildDir}/DEBIAN/postinst
|
chmod 755 ${DebBuildDir}/DEBIAN/postinst
|
||||||
chmod 755 ${DebBuildDir}/DEBIAN/postrm
|
chmod 755 ${DebBuildDir}/DEBIAN/postrm
|
||||||
sed -i "s/YYYYMMDD/${RelDate}/g" ${DebBuildDir}/DEBIAN/control
|
sed -i "s/YYYYMMDD/${RelDate}/g" ${DebBuildDir}/DEBIAN/control
|
||||||
DebPkgFile=omc-r${RelVer}-ub22-nms_cxy.deb
|
DebPkgFile=${DebReleaseDebsDir}/omc-r${RelVer}-ub22-nms_cxy.deb
|
||||||
dpkg -b ${DebBuildDir} ${DebReleaseDebsDir}/${DebPkgFile}
|
dpkg -b ${DebBuildDir} ${DebPkgFile}
|
||||||
|
|
||||||
# 生成MD5文件
|
# 生成MD5文件
|
||||||
cd $DebReleaseDebsDir
|
|
||||||
rm -f omc-md5sum.txt
|
rm -f omc-md5sum.txt
|
||||||
md5sum ${DebReleaseDebsDir}/${DebPkgFile} >omc-md5sum.txt
|
md5sum ${DebPkgFile} >omc-md5sum.txt
|
||||||
|
echo ${DebPkgFile}
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
usage
|
usage
|
||||||
|
|||||||
@@ -3,10 +3,8 @@
|
|||||||
%define __arch_install_post %{nil}
|
%define __arch_install_post %{nil}
|
||||||
%define release_version 1
|
%define release_version 1
|
||||||
%define release_date %(echo `date +%%Y%%m%%d`)
|
%define release_date %(echo `date +%%Y%%m%%d`)
|
||||||
%define project_lname omc
|
|
||||||
%define project_Uname OMC
|
|
||||||
|
|
||||||
Name: %{project_lname}
|
Name: omc
|
||||||
Summary: AGrandTech 5GC OMC
|
Summary: AGrandTech 5GC OMC
|
||||||
Version: 2.2407.1
|
Version: 2.2407.1
|
||||||
Release: %{release_date}
|
Release: %{release_date}
|
||||||
|
|||||||
Reference in New Issue
Block a user