r1819: further debian updates
[uffi.git] / make-dist.sh
1 #!/bin/sh
2
3 set -e
4
5 VERSION=`cat VERSION`
6 DEBPKG=cl-uffi
7 PKG=uffi
8 TOPDIR=`basename $PWD`
9 DISTDIR=${PKG}-${VERSION}
10
11 # first we clean everything up
12 echo "cleaning $PKG up for packaging"
13 make distclean
14
15 TAG=upstream_version_`echo $VERSION | tr . _`
16 echo "(re)tagging with release tag '$TAG'"
17 cvs -q rtag -d $TAG $PKG
18 cvs -q tag -F $TAG
19
20
21 # build the tarball
22 echo "building tarballs"
23 (   cd ..
24     rm -f ${PKG}_${VERSION}.tar.gz ${DEBPKG}_${VERSION}.orig.tar.gz
25     rm -rf ${DISTDIR} ${DEBPKG}-${VERSION} ${DISTDIR}.zip
26     cp -a ${TOPDIR} ${DISTDIR}
27     find $(PKG}-${VERSION} -type f -name .cvsignore -exec rm {} \;
28     find $(PKG)-${VERSION}/doc -type f -name \*.tex -or -name \*.aux -or \
29         -name \*.log -or -name \*.out -or -name \*.dvi -or \
30         -name \*~ -exec rm {} \;
31     cp -a ${DISTDIR} ${DEBPKG}-${VERSION}
32     rm -rf ${DISTDIR}/debian
33     GZIP=-9 tar czf ${DISTDIR}.tar.gz ${DISTDIR}
34
35     find ${DISTDIR} -type f -and -name \*.cl -or -name \*.list -or \
36         -name \*.system -or -name Makefile -or -name ChangeLog -or \
37         -name COPYRIGHT -or -name TODO -or -name README -or -name INSTALL \
38         -or -name NEWS -or -name \*.sgml -or -name COPYING\* -or -name catalog \
39         | xargs unix2dos
40     @zip -rq ${DISTDIR}.zip ${DISTDIR}
41     rm -rf ${DISTDIR}
42 )
43
44 exit 0