Anpassung an neues Archive Format

git-svn-id: svn://svn.compuextreme.de/Viitor/V962/ViitorMake@4888 504e572c-2e33-0410-9681-be2bf7408885
This commit is contained in:
kueller 2009-11-18 08:04:32 +00:00
parent f3b132398d
commit b7b2a82baf

View File

@ -103,8 +103,13 @@ if [ ! "$MODSRC" ]; then
echo_help
fi
DEPFILE=`echo $ARCHIVE|sed -e "s/tbz$/dep/"`
METAFILE=`echo $ARCHIVE|sed -e "s/tbz$/meta/"`
if [ ! -d $TMPROOT/../$$ ]; then
mkdir -p $TMPROOT/../$$
fi
ARCHCONTENTS="bin.drg bin.frg bin.md5 bin.tar dev.drg dev.frg dev.md5 dev.tar man.drg man.frg man.md5 man.tar"
DEPFILE=$TMPROOT/../$$/dep
METAFILE=$TMPROOT/../$$/dep
WDIR=`pwd`
source $VMAKEDIR/functions/functions
@ -137,6 +142,8 @@ if [ -f /tmp/deps$$ ]; then
for i in `cat /tmp/deps$$`; do
echo "WARN $i" >>$DEPFILE
done
bzip2 $DEPFILE
mv $DEPFILE.bz2 $DEPFILE
rm /tmp/deps$$
fi
@ -186,29 +193,59 @@ for i in `find . -name "*.la"`; do
mkdir -p $DEVTMPROOT/$DIR
mv $i $DEVTMPROOT/$DIR
done
mkdir $TMPROOT/../$$
InitDispatch
if [ ! `find . -type f|wc -l` == "0" ]; then
DispatchCMD "cd $TMPROOT" \
"MakeMgtFiles bin" \
"tar -cvf $TMPROOT/../$$/bin.tar ."
"tar -jcvf $TMPROOT/../$$/bin.tar ."
fi
if [ -d $MANTMPROOT ]; then
DispatchCMD "cd $MANTMPROOT" \
"MakeMgtFiles man" \
"tar -cvf $TMPROOT/../$$/man.tar ."
"tar -jcvf $TMPROOT/../$$/man.tar ."
fi
if [ -d $DEVTMPROOT ]; then
DispatchCMD "cd $DEVTMPROOT" \
"MakeMgtFiles dev" \
"tar -cvf $TMPROOT/../$$/dev.tar ."
"tar -jcvf $TMPROOT/../$$/dev.tar ."
fi
EndDispatch
cd $TMPROOT/../$$
tar -jcvf $ARCHIVE .
echo "ModuleName: $SHORTNAME" >$METAFILE
echo "Module Version: $MODVERSION" >>$METAFILE
echo "Quellen: $MODSRC" >>$METAFILE
echo "Description:" >>$METAFILE
echo "$DESCRIPT" >>$METAFILE
bzip2 $METAFILE
mv $METAFILE.bz2 $METAFILE
cd $TMPROOT/../$$
if [ -f $DEPFILE ]; then
LINE="`wc -c $DEPFILE|awk '{print $1}'` "
else
LINE="0 "
fi
if [ -f $METAFILE ]; then
LINE=$LINE"`wc -c $METAFILE|awk '{print $1}'` "
else
LINE=$LINE"0 "
fi
for i in $ARCHCONTENTS; do
if [ -f $i ]; then
LINE=$LINE"`wc -c $i|awk '{print $1}'` "
else
LINE=$LINE"0 "
fi
done
echo $LINE >$ARCHIVE
if [ -f $DEPFILE ]; then
cat $DEPFILE >>$ARCHIVE
fi
if [ -f $METAFILE ]; then
cat $METAFILE >>$ARCHIVE
fi
for i in $ARCHCONTENTS; do
if [ -f $i ]; then
cat $i >>$ARCHIVE
fi
done