]> granicus.if.org Git - libjpeg-turbo/commitdiff
Cygwin package build
authorDRC <dcommander@users.sourceforge.net>
Wed, 9 Jun 2010 20:16:04 +0000 (20:16 +0000)
committerDRC <dcommander@users.sourceforge.net>
Wed, 9 Jun 2010 20:16:04 +0000 (20:16 +0000)
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@208 632fc199-4ca6-4c93-a231-07263d6284db

Makefile.am
release/makecygwinpkg [new file with mode: 0755]

index e4c9d9a683c9cc45466fcb0918a52b6580e26599..28c84e7470e39c58a2f1877b789fdfa964226868 100644 (file)
@@ -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 (executable)
index 0000000..981cd9e
--- /dev/null
@@ -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 <package name> <version> <source dir.>"
+       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