]> ncurses.scripts.mit.edu Git - ncurses.git/blobdiff - Ada95/make-tar.sh
ncurses 5.8 - patch 20110319
[ncurses.git] / Ada95 / make-tar.sh
index 7a495102ccc97a73cbbf8e7c053cda2efc59c612..8ca32fb11183bf03abde66cdf28892b693c53386 100644 (file)
@@ -1,7 +1,7 @@
 #!/bin/sh
-# $Id: make-tar.sh,v 1.2 2010/02/20 23:45:13 tom Exp $
+# $Id: make-tar.sh,v 1.7 2011/03/19 19:27:36 tom Exp $
 ##############################################################################
-# Copyright (c) 2010 Free Software Foundation, Inc.                          #
+# Copyright (c) 2010,2011 Free Software Foundation, Inc.                     #
 #                                                                            #
 # Permission is hereby granted, free of charge, to any person obtaining a    #
 # copy of this software and associated documentation files (the "Software"), #
 # documentation.  The reason for doing that is to simplify distributing the
 # ada binding as a separate package.
 
-ROOTNAME=ncurses-Ada95
+CDPATH=:
+export CDPATH
 
 TARGET=`pwd`
 
-: ${TMPDIR=/tmp}
+: ${ROOTNAME:=ncurses-Ada95}
+: ${DESTDIR:=$TARGET}
+: ${TMPDIR:=/tmp}
 
 # This can be run from either the Ada95 subdirectory, or from the top-level
 # source directory.  We will put the tar file in the original directory.
 test -d ./Ada95 && cd ./Ada95
+SOURCE=`cd ..;pwd`
 
 BUILD=$TMPDIR/make-tar$$
 trap "cd /; rm -rf $BUILD; exit 0" 0 1 2 5 15
@@ -55,6 +59,15 @@ mkdir $BUILD/$ROOTNAME
 
 cp -p -r * $BUILD/$ROOTNAME/ || exit
 
+# Add the config.* utility scripts from the top-level directory.
+for i in . ..
+do
+       for j in config.guess config.sub install-sh tar-copy.sh
+       do
+               test -f $i/$j && cp -p $i/$j $BUILD/$ROOTNAME/
+       done
+done
+
 # Add the ada documentation.
 mkdir $BUILD/$ROOTNAME/doc || exit
 cd ../doc/html || exit
@@ -62,6 +75,11 @@ cd ../doc/html || exit
 cp -p -r Ada* $BUILD/$ROOTNAME/doc/
 cp -p -r ada $BUILD/$ROOTNAME/doc/
 
+cp -p $SOURCE/NEWS $BUILD/$ROOTNAME
+
+touch $BUILD/$ROOTNAME/MANIFEST 
+( cd $BUILD/$ROOTNAME && find . -type f -print |$SOURCE/misc/csort >MANIFEST )
+
 cd $BUILD || exit 
 
 # There is no need for this script in the tar file.
@@ -74,8 +92,8 @@ find . -name "*.gz" -exec rm -rf {} \;
 # Make the files writable...
 chmod -R u+w .
 
-tar cf - $ROOTNAME | gzip >$TARGET/$ROOTNAME.tar.gz
-cd $TARGET
+tar cf - $ROOTNAME | gzip >$DESTDIR/$ROOTNAME.tar.gz
+cd $DESTDIR
 
 pwd
 ls -l $ROOTNAME.tar.gz