2010-06-13 21:51:07 +02:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
# Slackware build script for p4
|
|
|
|
# Manpage from: http://www.perforce.com/perforce/doc.052/man/p4.1
|
2013-11-24 15:39:44 +01:00
|
|
|
# Written by Andy Bailey <GooseYArd@gmail.com>
|
2010-06-13 21:51:07 +02:00
|
|
|
|
|
|
|
PRGNAM=p4
|
2014-04-22 04:20:06 +02:00
|
|
|
VERSION=${VERSION:-2014.1.821990}
|
2010-06-13 21:51:07 +02:00
|
|
|
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}
|
|
|
|
|
|
|
|
set -e
|
|
|
|
|
|
|
|
mkdir -p $TMP $PKG $OUTPUT
|
|
|
|
mkdir -p $PKG/usr/bin $PKG/usr/man/man1
|
|
|
|
cp $CWD/p4 $PKG/usr/bin
|
|
|
|
gzip -9 -c < $CWD/p4.man > $PKG/usr/man/man1/p4.1.gz
|
|
|
|
|
|
|
|
chown root:root $PKG/usr/bin/p4 $PKG/usr/man/man1/p4.1.gz
|
|
|
|
chmod 0755 $PKG/usr/bin/p4
|
|
|
|
chmod 0644 $PKG/usr/man/man1/p4.1.gz
|
|
|
|
|
|
|
|
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}
|