diff --git a/packaging/Makefile b/packaging/Makefile index 75df6dd8f..8d884e61c 100644 --- a/packaging/Makefile +++ b/packaging/Makefile @@ -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) diff --git a/packaging/control b/packaging/control index 618d9bb73..caca73ef3 100755 --- a/packaging/control +++ b/packaging/control @@ -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