| #!/bin/sh |
| |
| set -u |
| set -e |
| trap onexit INT |
| trap onexit TERM |
| trap onexit EXIT |
| |
| TMPDIR= |
| |
| onexit() |
| { |
| if [ ! "$TMPDIR" = "" ]; then |
| rm -rf $TMPDIR |
| fi |
| } |
| |
| PACKAGE_NAME=@PACKAGE_NAME@ |
| VERSION=@VERSION@ |
| SRCDIR=@abs_top_srcdir@ |
| |
| umask 022 |
| rm -f $PACKAGE_NAME-$VERSION-cygwin.tar.bz2 |
| TMPDIR=`mktemp -d /tmp/ljtbuild.XXXXXX` |
| __PWD=`pwd` |
| make install DESTDIR=$TMPDIR/pkg mandir=/opt/$PACKAGE_NAME/man |
| rm $TMPDIR/pkg/opt/$PACKAGE_NAME/lib/*.la |
| DOCDIR=$TMPDIR/pkg/usr/share/doc/$PACKAGE_NAME-$VERSION |
| mkdir -p $DOCDIR |
| install -m 644 $SRCDIR/README-turbo.txt $DOCDIR |
| install -m 644 $SRCDIR/README $DOCDIR |
| install -m 644 $SRCDIR/libjpeg.txt $DOCDIR |
| install -m 644 $SRCDIR/usage.txt $DOCDIR |
| ln -fs lib $TMPDIR/pkg/opt/$PACKAGE_NAME/lib32 |
| cd $TMPDIR/pkg |
| tar cfj ../$PACKAGE_NAME-$VERSION-cygwin.tar.bz2 * |
| cd $__PWD |
| mv $TMPDIR/*.tar.bz2 . |
| |
| exit 0 |