slackbuilds_ponce/network/proxymini/proxymini.SlackBuild
dsomero 687c78d560 various: Fix SlackBuild formatting and comment nit picks.
Signed-off-by: dsomero <xgizzmo@slackbuilds.org>
2013-11-22 02:34:22 -05:00

62 lines
1.2 KiB
Bash

#!/bin/sh
# Slackware build script for proxymini
# Written by Thomas Morper <thomas@beingboiled.info>
PRGNAM=proxymini
VERSION=${VERSION:-0.2.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
unzip -d $PRGNAM-$VERSION $CWD/$PRGNAM.zip
cd $PRGNAM-$VERSION
chown -R root:root .
find . -type f -exec chmod 644 {} \;
CFLAGS="$SLKCFLAGS" make
mkdir -p $PKG/usr/bin
cp -a proxymini $PKG/usr/bin
mkdir -p $PKG/usr/man/man1
cat $CWD/proxymini.1 > $PKG/usr/man/man1/proxymini.1
gzip -9 $PKG/usr/man/man1/proxymini.1
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
cd $PKG
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}