aboutsummaryrefslogtreecommitdiff
path: root/development/p4/p4.SlackBuild
blob: ed7914a1a7a232d91461bdced0fcf67f67449cfb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#!/bin/bash

# Slackware build script for p4
# Written by Andy Bailey <GooseYArd@gmail.com>
# Modified by David Sullins <david.sullins@gmail.com>

cd $(dirname $0) ; CWD=$(pwd)

PRGNAM=p4
VERSION=${VERSION:-2018.2.1740258}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}

if [ -z "$ARCH" ]; then
  case "$( uname -m )" in
    i?86) ARCH=i586 ;;
    arm*) ARCH=arm ;;
       *) ARCH=$( uname -m ) ;;
  esac
fi

TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}

set -e

mkdir -p $TMP $PKG $OUTPUT
mkdir -p $PKG/usr/bin
cp $CWD/$PRGNAM $PKG/usr/bin

chown root:root $PKG/usr/bin/$PRGNAM
chmod 0755 $PKG/usr/bin/$PRGNAM

mkdir -p $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
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}