2021-07-04 01:48:15 +08:00
|
|
|
#!/bin/bash
|
2010-06-14 03:51:07 +08:00
|
|
|
|
|
|
|
# Slackware build script for p4
|
2013-11-24 22:39:44 +08:00
|
|
|
# Written by Andy Bailey <GooseYArd@gmail.com>
|
2016-10-13 14:11:36 +08:00
|
|
|
# Modified by David Sullins <david.sullins@gmail.com>
|
2010-06-14 03:51:07 +08:00
|
|
|
|
2021-07-04 17:41:06 +08:00
|
|
|
cd $(dirname $0) ; CWD=$(pwd)
|
|
|
|
|
2010-06-14 03:51:07 +08:00
|
|
|
PRGNAM=p4
|
2018-12-26 22:18:29 +08:00
|
|
|
VERSION=${VERSION:-2018.2.1740258}
|
2010-06-14 03:51:07 +08:00
|
|
|
BUILD=${BUILD:-1}
|
|
|
|
TAG=${TAG:-_SBo}
|
2021-07-04 18:23:38 +08:00
|
|
|
PKGTYPE=${PKGTYPE:-tgz}
|
2010-06-14 03:51:07 +08:00
|
|
|
|
|
|
|
if [ -z "$ARCH" ]; then
|
|
|
|
case "$( uname -m )" in
|
2017-02-03 20:05:49 +08:00
|
|
|
i?86) ARCH=i586 ;;
|
2010-06-14 03:51:07 +08:00
|
|
|
arm*) ARCH=arm ;;
|
|
|
|
*) ARCH=$( uname -m ) ;;
|
|
|
|
esac
|
|
|
|
fi
|
|
|
|
|
2021-07-04 18:23:38 +08:00
|
|
|
# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
|
|
|
|
# the name of the created package would be, and then exit. This information
|
|
|
|
# could be useful to other scripts.
|
|
|
|
if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
|
|
|
|
echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
|
|
|
|
exit 0
|
|
|
|
fi
|
|
|
|
|
2010-06-14 03:51:07 +08:00
|
|
|
TMP=${TMP:-/tmp/SBo}
|
|
|
|
PKG=$TMP/package-$PRGNAM
|
|
|
|
OUTPUT=${OUTPUT:-/tmp}
|
|
|
|
|
|
|
|
set -e
|
|
|
|
|
|
|
|
mkdir -p $TMP $PKG $OUTPUT
|
2016-10-13 14:11:36 +08:00
|
|
|
mkdir -p $PKG/usr/bin
|
|
|
|
cp $CWD/$PRGNAM $PKG/usr/bin
|
2010-06-14 03:51:07 +08:00
|
|
|
|
2016-10-13 14:11:36 +08:00
|
|
|
chown root:root $PKG/usr/bin/$PRGNAM
|
|
|
|
chmod 0755 $PKG/usr/bin/$PRGNAM
|
2010-06-14 03:51:07 +08:00
|
|
|
|
2017-02-03 20:05:49 +08:00
|
|
|
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
|
|
|
|
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
|
|
|
|
|
2010-06-14 03:51:07 +08:00
|
|
|
mkdir -p $PKG/install
|
|
|
|
cat $CWD/slack-desc > $PKG/install/slack-desc
|
|
|
|
|
|
|
|
cd $PKG
|
2021-07-04 18:23:38 +08:00
|
|
|
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE
|