X-Git-Url: http://git.kpe.io/?a=blobdiff_plain;f=make-dist.sh;h=2b721dd77e5f75699ed74eab53f94fd8754befdf;hb=28a219078020ff986e6010cef96e83b062823f71;hp=702cb520089d530b74e7fdb7c254d4717d22dccf;hpb=253a620bdb46d2c36fac9e20e433ed5bcd71a7be;p=uffi.git diff --git a/make-dist.sh b/make-dist.sh index 702cb52..2b721dd 100755 --- a/make-dist.sh +++ b/make-dist.sh @@ -1,7 +1,6 @@ -#!/bin/sh - -# Creates debian and system-independent archive files -# Programmer: Kevin Rosenberg based on script used by onShore Development +#!/bin/bash +# Creates debian and upstream packages +# Programmer: Kevin Rosenberg set -e @@ -13,52 +12,56 @@ TOPDIR=`basename $PWD` DISTDIR=${PKG}-${VERSION} DEBDIR=${DEBPKG}-${VERSION} -TAG=upstream_version_`echo $VERSION | tr . _` -echo "(re)tagging with release tag '$TAG'" -cvs -q rtag -d $TAG $PKG -cvs -q tag -F $TAG +#echo "(re)tagging with release tag '$TAG'" +#TAG=upstream_version_`echo $VERSION | tr . _` +#cvs -q rtag -d $TAG $PKG +#cvs -q tag -F $TAG -# build the tarball -echo "building tarballs" +# Prepare for archive cd .. rm -f ${PKG}_${VERSION}.tar.gz ${DEBPKG}_${VERSION}.orig.tar.gz rm -rf ${DISTDIR} ${DEBDIR} ${DISTDIR}.zip cp -a ${TOPDIR} ${DISTDIR} -# Remove junk from distribution dir -find ${DISTDIR} -type f -name .cvsignore -exec rm {} \; -find ${DISTDIR} -type d -name CVS | xargs rm -r -find ${DISTDIR}/doc -type f -name \*.tex -or -name \*.aux -or \ - -name \*.log -or -name \*.out -or -name \*.dvi -or \ - -name \*~ -or -name .\#\* -or -name \#*\# |xargs rm -f +echo "Cleaning distribution directory ${DISTDIR}" +find ${DISTDIR} -type f -name .cvsignore -exec rm -f {} \; +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 \ + -name \*.log -or -name \*.out -or -name \*.dvi` -# Create original distribution archives +echo "Creating upstream archives" rm -rf ${DISTDIR}/debian GZIP=-9 tar czf ${DISTDIR}.tar.gz ${DISTDIR} cp -a ${DISTDIR} ${DEBDIR} GZIP=-9 tar czf ${DEBPKG}_${VERSION}.orig.tar.gz ${DEBDIR} -find ${DISTDIR} -type f -and -name \*.cl -or -name \*.list -or \ +unix2dos `find ${DISTDIR} -type f -name \*.cl -or -name \*.list -or \ -name \*.system -or -name Makefile -or -name ChangeLog -or \ - -name COPYRIGHT -or -name TODO -or -name README -or -name INSTALL \ - -or -name NEWS -or -name \*.sgml -or -name COPYING\* -or -name catalog \ - | xargs unix2dos + -name COPYRIGHT -or -name TODO -or -name README -or -name INSTALL -or \ + -name NEWS -or -name \*.sgml -or -name COPYING\* -or -name catalog` zip -rq ${DISTDIR}.zip ${DISTDIR} cp -a ${TOPDIR}/debian ${DEBDIR} +rm -f ${DEBDIR}/debian/.cvsignore +rm -rf ${DEBDIR}/debian/CVS cd ${DEBDIR} +echo "Building Debian files" dpkg-buildpackage -rfakeroot -kkevin@b9.com -a cd .. rm -rf ${DEBDIR} rm -rf ${DISTDIR} +echo "Checking Debian Files" lintian ${DEBPKG}_${VERSION}-*.changes -mkdir -p /usr/local/share/Packages/${DEBPKG} -mv ${DEBPKG}_${VERSION}* /usr/local/share/Packages/${DEBPKG} +echo "Moving Debian Files to /usr/local/src/Packages/${DEBPKG}" +mkdir -p /usr/local/src/Packages/${DEBPKG} +mv ${DEBPKG}_${VERSION}* /usr/local/src/Packages/${DEBPKG} cd ${TOPDIR} + exit 0