From ae79fdbc2d6f8c644ced2d0e424b4d43e0dca66c Mon Sep 17 00:00:00 2001 From: DRC Date: Wed, 9 Jun 2010 20:16:04 +0000 Subject: [PATCH] Cygwin package build git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@208 632fc199-4ca6-4c93-a231-07263d6284db --- Makefile.am | 3 +++ release/makecygwinpkg | 49 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 52 insertions(+) create mode 100755 release/makecygwinpkg diff --git a/Makefile.am b/Makefile.am index e4c9d9a..28c84e7 100644 --- a/Makefile.am +++ b/Makefile.am @@ -176,3 +176,6 @@ nsi: all -DPLATFORM="GCC" -DGCC $(srcdir)/release/libjpeg-turbo.nsi endif + +cygwinpkg: all + sh $(srcdir)/release/makecygwinpkg ${PACKAGE_NAME} ${VERSION} ${srcdir} diff --git a/release/makecygwinpkg b/release/makecygwinpkg new file mode 100755 index 0000000..981cd9e --- /dev/null +++ b/release/makecygwinpkg @@ -0,0 +1,49 @@ +#!/bin/sh + +set -u +set -e +trap onexit INT +trap onexit TERM +trap onexit EXIT + +TMPDIR= + +onexit() +{ + if [ ! "$TMPDIR" = "" ]; then + rm -rf $TMPDIR + fi +} + +usage() +{ + echo "$0 " + exit 1 +} + +if [ $# -lt 3 ]; then usage $0; fi +PACKAGE_NAME=$1 +VERSION=$2 +SRCDIR=$3 + +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.doc $DOCDIR +install -m 644 $SRCDIR/usage.doc $DOCDIR +install -m 644 $SRCDIR/LICENSE.txt $DOCDIR +install -m 644 $SRCDIR/LGPL.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 -- 2.40.0