mirror of
https://gitee.com/acl-dev/acl.git
synced 2024-12-01 19:37:45 +08:00
rpm package
This commit is contained in:
parent
815ef17fb9
commit
9f6df1f533
@ -22,8 +22,10 @@ tar:
|
||||
|
||||
libs: tar
|
||||
@mkdir -p {BUILD,BUILDROOT,SRPMS,SPECS}
|
||||
@rpmbuild --define "_topdir ${PWD}" --define "_sourcedir ${PWD}" --define "_rpmdir ${PWD}" ${DEBUGINFO} -bb $(PKG_NAME).spec
|
||||
@echo Binary PRM for $(PKG_NAME) has been created under ${PWD}/`rpm --eval '%{_arch}'`
|
||||
@rpmbuild --define "_topdir ${PWD}" --define "_sourcedir ${PWD}" \
|
||||
--define "_rpmdir ${PWD}" ${DEBUGINFO} -bb $(PKG_NAME).spec
|
||||
@echo Binary PRM for $(PKG_NAME) has been created under ${PWD}/ \
|
||||
`rpm --eval '%{_arch}'`
|
||||
|
||||
clean cl:
|
||||
@rm -rf $(PKG_NAME)-$(PKG_VERSION)
|
||||
|
@ -10,8 +10,8 @@ function pack() {
|
||||
cd ..
|
||||
PROJECT_NAME="${PKG_NAME}-${PKG_VERSION}"
|
||||
git archive --format=tar --prefix=$PROJECT_NAME/ HEAD | (tar xpf -)
|
||||
tar zcpf ${PROJECT_NAME}.tar.gz ${PROJECT_NAME}
|
||||
/bin/mv -f ${PROJECT_NAME}.tar.gz packaging
|
||||
tar zcpf ${PROJECT_NAME}.tar.gz ${PROJECT_NAME}
|
||||
/bin/mv -f ${PROJECT_NAME}.tar.gz packaging/
|
||||
rm -rf ${PKG_NAME}-${PKG_VERSION}
|
||||
cd -
|
||||
}
|
||||
@ -22,12 +22,12 @@ function help() {
|
||||
|
||||
# 检测rpmbuild是否可使用--nodebuginfo参数
|
||||
function debuginfo() {
|
||||
local exist_debuginfo=`rpmbuild --help |grep 'nodebuginfo' |wc -l`
|
||||
if [ ${exist_debuginfo} -eq 1 ]; then
|
||||
echo "--nodebuginfo"
|
||||
else
|
||||
echo ""
|
||||
fi
|
||||
local exist_debuginfo=`rpmbuild --help | grep 'nodebuginfo' | wc -l`
|
||||
if [ ${exist_debuginfo} -eq 1 ]; then
|
||||
echo "--nodebuginfo"
|
||||
else
|
||||
echo ""
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
@ -40,7 +40,7 @@ if [ "$1" == "" ]; then
|
||||
elif [ "$1" == "pack" ];then
|
||||
pack $2
|
||||
elif [ "$1" == "debuginfo" ];then
|
||||
debuginfo
|
||||
debuginfo
|
||||
elif [ "$1" == "test" ];then
|
||||
run_test
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user