X-Git-Url: http://git.kpe.io/?a=blobdiff_plain;f=make-dist.sh;h=9dbc73bfdebba660550816936c22e301de5579fc;hb=aa269788e108d3b8861aad5cb5a7b28278677cdf;hp=67da5b2d41c3280b6546cb316012c60462d02c20;hpb=b81fba0f61b4d41d3883b086a332e31ad68e1573;p=uffi.git diff --git a/make-dist.sh b/make-dist.sh index 67da5b2..9dbc73b 100755 --- a/make-dist.sh +++ b/make-dist.sh @@ -10,16 +10,22 @@ TOPDIR=`basename $PWD` VERSION=`cat VERSION` DEBVERSION=`sed -n -e "s/${DEBPKG} (\(.*\)).*/\1/p" < debian/changelog |head -1` -echo ${DEBVERSION} DISTDIR=${PKG}-${VERSION} DEBDIR=${DEBPKG}-${VERSION} -echo "(re)tagging with release tag '$TAG'" -TAG=debian_version_`echo ${DEBVERSION} | tr . _` -cvs -q rtag -d $TAG $PKG -cvs -q tag -F $TAG - +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 # Prepare for archive cd .. @@ -28,7 +34,8 @@ rm -rf ${DISTDIR} ${DEBDIR} ${DISTDIR}.zip cp -a ${TOPDIR} ${DISTDIR} echo "Cleaning distribution directory ${DISTDIR}" -find ${DISTDIR} -type f -name .cvsignore -exec rm -f {} \; +rm -f ${DISTDIR}/upload.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 '#*#'` rm -f `find ${DISTDIR}/doc -type f -name \*.tex -or -name \*.aux -or \ @@ -51,14 +58,16 @@ cp -a ${TOPDIR}/debian ${DEBDIR} rm -f ${DEBDIR}/debian/.cvsignore rm -rf ${DEBDIR}/debian/CVS -rm -rf ${DEBDIR} rm -rf ${DISTDIR} +export CVS_BUILDPACKAGE=1 if [ "${CVS_BUILDPACKAGE}" != "" ]; then + rm -rf ${DEBDIR} + mv ${DEBPKG}_${VERSION}.orig.tar.gz /usr/local/src/Packages/${DEBPKG} +else cd ${DEBDIR} echo "Building Debian files" - dpkg-buildpackage -rfakeroot -kkevin@b9.com -a - + dpkg-buildpackage -rfakeroot -kkevin@rosenberg.net -a echo "Checking Debian Files" lintian ${DEBPKG}_${VERSION}-*.changes @@ -66,6 +75,7 @@ if [ "${CVS_BUILDPACKAGE}" != "" ]; then mkdir -p /usr/local/src/Packages/${DEBPKG} mv ${DEBPKG}_${VERSION}* /usr/local/src/Packages/${DEBPKG} cd .. + rm -rf ${DEBDIR} fi cd ${TOPDIR}