X-Git-Url: http://git.kpe.io/?a=blobdiff_plain;f=make-dist.sh;h=7c0922f51cd0aa0d8f98a8890b12161f122466f1;hb=8fd93066af42dcd11b1b7b04808ab3474b727b4a;hp=fdf21ea5069b0b8b8994027dcb9784bb55eb00d8;hpb=a08ecef939472cb70d1c8a10450648bea57b0b77;p=uffi.git diff --git a/make-dist.sh b/make-dist.sh index fdf21ea..7c0922f 100755 --- a/make-dist.sh +++ b/make-dist.sh @@ -1,16 +1,17 @@ #!/bin/sh +# Creates debian and system-independent archive files +# Programmer: Kevin Rosenberg based on script used by onShore Development + set -e VERSION=`cat VERSION` DEBPKG=cl-uffi PKG=uffi TOPDIR=`basename $PWD` -DISTDIR=${PKG}-${VERSION} -# first we clean everything up -echo "cleaning $PKG up for packaging" -make distclean +DISTDIR=${PKG}-${VERSION} +DEBDIR=${DEBPKG}-${VERSION} TAG=upstream_version_`echo $VERSION | tr . _` echo "(re)tagging with release tag '$TAG'" @@ -20,25 +21,45 @@ cvs -q tag -F $TAG # build the tarball echo "building tarballs" -( cd .. - rm -f ${PKG}_${VERSION}.tar.gz ${DEBPKG}_${VERSION}.orig.tar.gz - rm -rf ${DISTDIR} ${DEBPKG}-${VERSION} ${DISTDIR}.zip - cp -a ${TOPDIR} ${DISTDIR} - find $(PKG}-${VERSION} -type f -name .cvsignore -exec rm {} \; - find $(PKG)-${VERSION}/doc -type f -name \*.tex -or -name \*.aux -or \ - -name \*.log -or -name \*.out -or -name \*.dvi -or \ - -name \*~ -exec rm {} \; - cp -a ${DISTDIR} ${DEBPKG}-${VERSION} - rm -rf ${DISTDIR}/debian - GZIP=-9 tar czf ${DISTDIR}.tar.gz ${DISTDIR} - - find ${DISTDIR} -type f -and -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 - @zip -rq ${DISTDIR}.zip ${DISTDIR} - rm -rf ${DISTDIR} -) +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 + +# Create original distribution archives +rm -rf ${DISTDIR}/debian +GZIP=-9 tar czf ${DISTDIR}.tar.gz ${DISTDIR} + +cp -a ${DISTDIR} ${DEBDIR} +# rm -f ${DEBDIR}/debian/.cvsignore +GZIP=-9 tar czf ${DEBPKG}_${VERSION}.orig.tar.gz ${DEBDIR} + +find ${DISTDIR} -type f -and -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 +zip -rq ${DISTDIR}.zip ${DISTDIR} + +cp -a ${TOPDIR}/debian ${DEBDIR} + +cd ${DEBDIR} +dpkg-buildpackage -rfakeroot -kkevin@b9.com -a + +cd .. +rm -rf ${DEBDIR} +rm -rf ${DISTDIR} + +lintian ${DEBPKG}_${VERSION}-*.changes +mkdir -p /usr/local/share/Packages/${DEBPKG} +mv ${DEBPKG}_${VERSION}* /usr/local/src/Packages/${DEBPKG} +cd ${TOPDIR} exit 0