X-Git-Url: http://git.kpe.io/?a=blobdiff_plain;f=make-dist.sh;h=334ed930bbe7db0e5bc97330978594f4deed910b;hb=e9202180c11296fdc9e6774979f02d32c16e4f28;hp=8d57aeab5ec064fe580439f3f0889d326e8e76aa;hpb=fb7c7fe7f0cd087086506f2893336292f5bf9133;p=uffi.git diff --git a/make-dist.sh b/make-dist.sh index 8d57aea..334ed93 100755 --- a/make-dist.sh +++ b/make-dist.sh @@ -2,7 +2,34 @@ # Creates debian and upstream packages # Programmer: Kevin Rosenberg -set -e +set -e # abort on error + +progname="`basename \"$0\"`" + +usage () { + cat >&2 < /dev/null -cvs -q tag -F ${DEB_TAG} > /dev/null - -# Retag with upstream tag if release not 0 or 1 -if [ "`echo ${DEBVERSION} | egrep '\-0$\-1$]'`" != "" ]; then - echo "(Re-)tagging with Upstream tag '${UPSTREAM_TAG}'" - cvs -q rtag -d $UPSTREAM_TAG $PKG > /dev/null - cvs -q tag -F $UPSTREAM_TAG > /dev/null +if [ ! -z ${opt_tag} ]; then + DEB_TAG=debian_version_`echo ${DEBVERSION} | tr . _` + UPSTREAM_TAG=upstream_version_`echo ${VERSION} | tr . _` + echo "(Re-)tagging with Debian tag '${DEB_TAG}'" + cvs -q rtag -d ${DEB_TAG} ${PKG} > /dev/null + cvs -q tag -F ${DEB_TAG} > /dev/null + + # Retag with upstream tag if release not 0 or 1 + if [ "`echo ${DEBVERSION} | egrep '\-0$\-1$]'`" != "" ]; then + echo "(Re-)tagging with Upstream tag '${UPSTREAM_TAG}'" + cvs -q rtag -d $UPSTREAM_TAG $PKG > /dev/null + cvs -q tag -F $UPSTREAM_TAG > /dev/null + fi fi - # Prepare for archive cd .. rm -f ${PKG}_${VERSION}.tar.gz ${DEBPKG}_${VERSION}.orig.tar.gz @@ -34,7 +62,7 @@ rm -rf ${DISTDIR} ${DEBDIR} ${DISTDIR}.zip cp -a ${TOPDIR} ${DISTDIR} echo "Cleaning distribution directory ${DISTDIR}" -rm -f ${DISTDIR}/upload.sh +rm -f ${DISTDIR}/upload.sh ${DISTDIR}/make-dist.sh rm -f `find ${DISTDIR} -type f -name .cvsignore` rm -rf `find ${DISTDIR} -type d -name CVS` rm -f `find ${DISTDIR} -type f -name '*~' -or -name '#*' -or -name '#*#'` @@ -60,23 +88,29 @@ rm -rf ${DEBDIR}/debian/CVS rm -rf ${DISTDIR} -export CVS_BUILDPACKAGE=1 -if [ "${CVS_BUILDPACKAGE}" == "" ]; then +if [ -z ${opt_cvs_buildpackage} ]; then cd ${DEBDIR} echo "Building Debian files" dpkg-buildpackage -rfakeroot -kkevin@rosenberg.net -a - echo "Checking Debian Files" - lintian ${DEBPKG}_${VERSION}-*.changes - cd .. +else + cvsbp fi +cd .. +rm -rf ${DEBDIR} + echo "Moving Upstream and Debian Files to ${PACKAGE_DIR}" mkdir -p /usr/local/src/Packages/${DEBPKG} mv ${DEBPKG}_${VERSION}* ${PACKAGE_DIR} -rm -rf ${DEBDIR} mv ${DISTDIR}.zip ${PACKAGE_DIR} mv ${DISTDIR}.tar.gz ${PACKAGE_DIR} +if [ ! -z ${opt_lintian} ]; then + pushd ${PACKAGE_DIR} > /dev/null + lintian ${DEBPKG}_{DEBVERSION}_*.changes + popd > /dev/null +fi + cd ${TOPDIR} exit 0