2010-05-11 20:00:45 +02:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
# Slackware build script for Exiftool
|
2011-12-28 13:13:17 +01:00
|
|
|
|
2011-07-24 06:46:02 +02:00
|
|
|
# Copyright 2011 David Spencer, Baildon, West Yorkshire, U.K.
|
|
|
|
# All rights reserved.
|
|
|
|
#
|
|
|
|
# Redistribution and use of this script, with or without modification, is
|
|
|
|
# permitted provided that the following conditions are met:
|
|
|
|
#
|
|
|
|
# 1. Redistributions of this script must retain the above copyright
|
|
|
|
# notice, this list of conditions and the following disclaimer.
|
|
|
|
#
|
|
|
|
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED
|
|
|
|
# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
|
|
|
# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
|
|
|
|
# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
|
|
|
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
|
|
|
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
|
|
|
|
# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
|
|
|
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
|
|
|
|
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
|
|
|
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
2010-05-11 20:00:45 +02:00
|
|
|
|
|
|
|
PRGNAM=exiftool
|
2012-05-11 19:34:49 +02:00
|
|
|
VERSION=${VERSION:-8.90}
|
2010-05-11 20:00:45 +02:00
|
|
|
BUILD=${BUILD:-1}
|
|
|
|
TAG=${TAG:-_SBo}
|
|
|
|
|
2010-05-24 17:32:09 +02:00
|
|
|
if [ -z "$ARCH" ]; then
|
|
|
|
case "$( uname -m )" in
|
2010-06-04 07:06:31 +02:00
|
|
|
i?86) ARCH=i486 ;;
|
|
|
|
arm*) ARCH=arm ;;
|
|
|
|
*) ARCH=$( uname -m ) ;;
|
2010-05-24 17:32:09 +02:00
|
|
|
esac
|
|
|
|
fi
|
|
|
|
|
2010-05-11 20:00:45 +02:00
|
|
|
CWD=$(pwd)
|
|
|
|
TMP=${TMP:-/tmp/SBo}
|
|
|
|
PKG=$TMP/package-$PRGNAM
|
|
|
|
OUTPUT=${OUTPUT:-/tmp}
|
|
|
|
|
|
|
|
set -e
|
|
|
|
|
|
|
|
rm -rf $PKG
|
|
|
|
mkdir -p $TMP $PKG $OUTPUT
|
|
|
|
cd $TMP
|
|
|
|
rm -rf Image-ExifTool-$VERSION
|
|
|
|
tar xvf $CWD/Image-ExifTool-$VERSION.tar.gz
|
|
|
|
cd Image-ExifTool-$VERSION
|
|
|
|
chown -R root:root .
|
|
|
|
chmod -R u+w,go+r-w,a-s .
|
|
|
|
|
2010-05-11 22:23:37 +02:00
|
|
|
perl Makefile.PL INSTALLDIRS=vendor
|
2010-05-11 20:00:45 +02:00
|
|
|
make test
|
2011-07-24 06:46:02 +02:00
|
|
|
make install INSTALLDIRS=vendor DESTDIR=$PKG
|
2010-05-11 20:00:45 +02:00
|
|
|
|
|
|
|
mv $PKG/usr/share/man $PKG/usr/man
|
2010-05-12 17:40:34 +02:00
|
|
|
|
2010-05-24 17:33:31 +02:00
|
|
|
find $PKG/usr/man -type f -exec gzip -9 {} \;
|
2010-05-11 20:00:45 +02:00
|
|
|
|
2010-05-24 17:32:09 +02:00
|
|
|
find $PKG -name perllocal.pod \
|
|
|
|
-o -name ".packlist" \
|
|
|
|
-o -name "*.bs" \
|
|
|
|
| xargs rm -f
|
2010-05-11 20:00:45 +02:00
|
|
|
|
2010-05-12 17:40:34 +02:00
|
|
|
# Kill some empty directories
|
|
|
|
eval $(perl '-V:archlib')
|
|
|
|
eval $(perl '-V:vendorarch')
|
2010-12-06 02:51:11 +01:00
|
|
|
rmdir -p $PKG/$vendorarch/auto/Image/ExifTool $PKG/$archlib 2>/dev/null || true
|
2010-05-12 17:40:34 +02:00
|
|
|
|
2010-05-11 20:00:45 +02:00
|
|
|
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
|
|
|
|
cp -a Changes README html/ $PKG/usr/doc/$PRGNAM-$VERSION
|
|
|
|
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
|
|
|
|
|
|
|
|
mkdir -p $PKG/install
|
|
|
|
cat $CWD/slack-desc > $PKG/install/slack-desc
|
|
|
|
|
|
|
|
cd $PKG
|
2010-05-13 00:29:21 +02:00
|
|
|
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
|