r1820: further debian improvements
authorKevin M. Rosenberg <kevin@rosenberg.net>
Sun, 28 Apr 2002 09:01:00 +0000 (09:01 +0000)
committerKevin M. Rosenberg <kevin@rosenberg.net>
Sun, 28 Apr 2002 09:01:00 +0000 (09:01 +0000)
Makefile
doc/Makefile
make-dist.sh

index eec3c379847361aca7abf529d48c8a8827c31d5a..91b4b15c2a5a7b72b201a07ef4484f022331220e 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -5,7 +5,7 @@
 #  Programer:    Kevin M. Rosenberg, M.D.
 #  Date Started: Mar 2002
 #
-#  CVS Id:   $Id: Makefile,v 1.44 2002/04/28 08:19:55 kevin Exp $
+#  CVS Id:   $Id: Makefile,v 1.45 2002/04/28 09:01:00 kevin Exp $
 #
 # This file, part of UFFI, is Copyright (c) 2002 by Kevin M. Rosenberg
 #
@@ -54,7 +54,7 @@ doc:
 .PHONY: dist
 dist: distclean
        $(MAKE) -C doc $@
-       @make-dist.sh
+       @./make-dist.sh
 
 .PHONY: wwwdist
 wwwdist: dist
index 6b377ebba8c3068320025ecbcb9fab306a472c5e..2fbebbf0c84e8ac03febf220d448ad486b877265 100644 (file)
@@ -5,7 +5,7 @@
 #  Programer:    Kevin M. Rosenberg
 #  Date Started: Mar 2002
 #
-#  CVS Id:   $Id: Makefile,v 1.18 2002/04/28 06:03:13 kevin Exp $
+#  CVS Id:   $Id: Makefile,v 1.19 2002/04/28 09:01:00 kevin Exp $
 #
 # This file, part of UFFI, is Copyright (c) 2002 by Kevin M. Rosenberg
 #
@@ -47,10 +47,10 @@ TMPFILES=${DOCFILE_BASE}.aux ${DOCFILE_BASE}.out ${DOCFILE_BASE}.log
 DOCFILES=$(shell echo *.sgml)
 
 .PHONY: all
-all: html pdf ps dvi
+all: html pdf ps
 
 .PHONY: dist
-dist: html pdf
+dist: html pdf ps
 
 .PHONY: doc
 doc: html ps
@@ -101,12 +101,12 @@ ${PSFILE}: ${DVIFILE}
 
 .PHONY: clean
 clean: 
-       @rm -rf html
-       @rm -f *~ *.bak *.orig "#*"
+       @rm -f *~ *.bak *.orig \#*\# .\#*
        @rm -f ${TMPFILES}
 
 .PHONY: distclean
 distclean: clean
+       @rm -rf html
        @rm -f ${PSFILE} ${PDFFILE} ${DVIFILE} ${TEXFILE}
 
 
index fdf21ea5069b0b8b8994027dcb9784bb55eb00d8..cb93b81b31baa47e2179e25ca44285f1d5349bae 100755 (executable)
@@ -6,39 +6,56 @@ 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'"
-cvs -q rtag -d $TAG $PKG
-cvs -q tag -F $TAG
+#cvs -q rtag -d $TAG $PKG
+#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
+
+# Copy dist dir to debian directory
+cp -a ${DISTDIR} ${DEBDIR}
+rm -f ${DEBDIR}/${PKG}.system
+mv ${DEBDIR}/${PKG}.system.debian ${DEBDIR}/${PKG}.system
+
+# Create original distribution archive
+rm -rf ${DISTDIR}/debian ${DISTDIR}/*.system.debian 
+
+GZIP=-9 tar czf ${DISTDIR}.tar.gz ${DISTDIR}
+
+ln -s ${DISTDIR}.tar.gz ${DEBPKG}_${VERSION}.orig.tar.gz
+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}
+
+# Create debian source package
+dpkg-source -b ${DEBDIR} ${DEBPKG}_${VERSION}.orig.tar.gz
+
+rm -rf ${DISTDIR}
+rm -rf ${DEBDIR}
+cd ${TOPLEVEL}
+
+dpkg-buildpackage -rfakeroot
+
 
 exit 0