#! /bin/sh

name=mpfr
version=2.3.1

djver1=`echo $version | sed -e 's:\.::2g'`
djver2=`echo $version | sed -e 's:\.::g'`
dname=$name-$djver1

rm -rf inst.djg
make install prefix=`pwd`/inst.djg

mkdir -p inst.djg/info
mkdir -p inst.djg/manifest
mkdir -p inst.djg/gnu/$dname

touch inst.djg/manifest/mpfr${djver2}b.mft

cat >inst.djg/manifest/mpfr${djver2}b.ver <<E2
mpfr${djver2}s.zip: MPFR - C library for multiple-precision floating-point computations (binaries)
E2

mv -v inst.djg/share/info/*.info inst.djg/info/
cp -v authors bugs COPYING* inst.djg/gnu/$dname/
cp -v news readme* todo inst.djg/gnu/$dname/
rm -rf inst.djg/share

( cd inst.djg && find . -type f | sed -e 's:^\./::' | sort >manifest/mpfr${djver2}b.mft )
( cd inst.djg && cat manifest/mpfr${djver2}b.mft | zip -9@ ../mpfr${djver2}b.zip )
