Files
mozjpeg/release/makecygwinpkg.in
DRC 6b236241d2 Change "libmozjpeg" to "mozjpeg" in packaging and install functions
This might be slightly more controversial, since it changes the CMake and
autotools project names and the binaty package names to "mozjpeg", and it
changes the default install directory to /opt/mozjpeg.  To me, this makes much
more sense, but it does represent a change in operational behavior, which is
why I put it in a separate commit.
2014-11-05 20:47:54 -06:00

43 lines
801 B
Bash
Executable File

#!/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=@PKGNAME@
VERSION=@VERSION@
BUILD=@BUILD@
SRCDIR=@abs_top_srcdir@
PREFIX=%{__prefix}
DOCDIR=%{__docdir}
LIBDIR=%{__libdir}
umask 022
rm -f $PACKAGE_NAME-$VERSION-$BUILD.tar.bz2
TMPDIR=`mktemp -d /tmp/ljtbuild.XXXXXX`
__PWD=`pwd`
make install DESTDIR=$TMPDIR/pkg docdir=/usr/share/doc/$PACKAGE_NAME-$VERSION \
exampledir=/usr/share/doc/$PACKAGE_NAME-$VERSION
rm $TMPDIR/pkg$LIBDIR/*.la
if [ "$PREFIX" = "/opt/mozjpeg" -a "$DOCDIR" = "/opt/mozjpeg/doc" ]; then
ln -fs /usr/share/doc/$PACKAGE_NAME-$VERSION $TMPDIR/pkg$DOCDIR
fi
cd $TMPDIR/pkg
tar cfj ../$PACKAGE_NAME-$VERSION-$BUILD.tar.bz2 *
cd $__PWD
mv $TMPDIR/*.tar.bz2 .
exit 0