slackbuilds_ponce/graphics/gpscorrelate/gpscorrelate.SlackBuild
David Spencer 9139f65dc6 graphics/gpscorrelate: Updated for version 1.6.1.
Signed-off-by: Robby Workman <rworkman@slackbuilds.org>
2010-07-03 02:31:43 -05:00

81 lines
2 KiB
Bash

#!/bin/sh
# Slackware build script for gpscorrelate
# Written by David Spencer <baildon.research@googlemail.com>
# This script is dedicated to the public domain
# Modified by Robby Workman <rworkman@slackbuilds.org>
PRGNAM=gpscorrelate
VERSION=1.6.1
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
i?86) ARCH=i486 ;;
arm*) ARCH=arm ;;
*) ARCH=$( uname -m ) ;;
esac
fi
CWD=$(pwd)
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
if [ "$ARCH" = "i486" ]; then
SLKCFLAGS="-O2 -march=i486 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "x86_64" ]; then
SLKCFLAGS="-O2 -fPIC"
LIBDIRSUFFIX="64"
else
SLKCFLAGS="-O2"
LIBDIRSUFFIX=""
fi
set -e
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
cd $PRGNAM-$VERSION
chown -R root:root .
chmod -R u+w,go+r-w,a-s .
make CFLAGS+="$SLKCFLAGS"
make install \
prefix=/usr \
mandir=/usr/man \
docdir=/usr/doc/$PRGNAM-$VERSION/html \
DESTDIR=$PKG
find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
find $PKG/usr/man -type f -exec gzip -9 {} \;
for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
mkdir -p $PKG/usr/share/applications
cat gpscorrelate.desktop > $PKG/usr/share/applications/gpscorrelate.desktop
mkdir -p $PKG/usr/share/icons/hicolor/scalable/apps/
cat gpscorrelate-gui.svg > $PKG/usr/share/icons/hicolor/scalable/apps/gpscorrelate-gui.svg
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a COPYING INSTALL README RELEASES \
$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
cat $CWD/doinst.sh > $PKG/install/doinst.sh
cd $PKG
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}