blob: ad8e24fcdb9460d075b96d442346a270f9a19627 (
about) (
plain) (
blame)
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
|
#!/bin/bash
# Slackware build script for gemget-bin
# Written by B. Watson (urchlay@slackware.uk)
# Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details.
cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=gemget-bin
SRCNAM=gemget
VERSION=${VERSION:-1.9.0}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
i?86) ARCH=i586 ;;
arm*) ARCH=arm ;;
*) ARCH=$( uname -m ) ;;
esac
fi
if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
exit 0
fi
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
EXE=""
case "$ARCH" in
i?86) EXE=${SRCNAM}_${VERSION}_linux_32-bit ;;
x86_64) EXE=${SRCNAM}_${VERSION}_linux_64-bit ;;
aarch64) EXE=${SRCNAM}_${VERSION}_linux_arm64 ;;
esac
if [ "$EXE" = "" ]; then
cat <<EOF
===================================================
Sorry, ARCH="$ARCH" is not supported.
Only i586, i686, x86_64, and aarch64 are supported.
===================================================
EOF
exit 1
fi
set -e
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $PKG
install -D -m0755 -oroot -groot $CWD/$EXE usr/bin/$SRCNAM
# the binary includes no docs. so they're included with the SlackBuild
# (taken from the git repo at https://github.com/makew0rld/gemget).
PKGDOC=$PKG/usr/doc/$PRGNAM-$VERSION
mkdir -p $PKGDOC
install -m0644 -oroot -groot $CWD/docs/* $PKGDOC
cat $CWD/$PRGNAM.SlackBuild > $PKGDOC/$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
|