slackbuilds/ap/conty/SlackBuild

75 lines
2.2 KiB
Text
Raw Normal View History

2021-06-15 10:26:26 +02:00
#!/bin/bash
2021-04-26 00:07:07 +02:00
CWD=$(pwd)
PRGNAM=$(basename $CWD)
GITHUB_REPO=Kron4ek/Conty
VERSION=${VERSION:-$(curl -s https://api.github.com/repos/${GITHUB_REPO}/releases/latest | grep tag_name | grep -o "[0-9.]*")}
2021-04-26 00:07:07 +02:00
ARCH=${ARCH:-$(uname -m)}
2023-03-06 10:42:39 +01:00
BUILD=${BUILD:-3}
2021-04-26 00:07:07 +02:00
TAG=${TAG:-gwh}
EDITION=${EDITION:-"_lite_dwarfs"} # "", "_lite", "_dwarfs", "_lite_dwarfs"
2021-04-26 00:07:07 +02:00
TMP=${TMP:-/tmp/$TAG}
PKG=$TMP/pkg-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
PREFIX=/usr
REPOSITORY=${REPOSITORY:-/home/installs/SlackBuilds/_repositories/$PRGNAM}
mkdir -p $REPOSITORY
2021-04-26 00:07:07 +02:00
[ ! -e $REPOSITORY/conty${EDITION}-${VERSION}.sh ] && wget -c https://github.com/${GITHUB_REPO}/releases/download/${VERSION}/conty${EDITION}.sh -O $REPOSITORY/conty${EDITION}-${VERSION}.sh
2021-04-26 00:07:07 +02:00
rm -fr $PKG
mkdir -p $PKG$PREFIX/bin
cp $REPOSITORY/conty${EDITION}-${VERSION}.sh $PKG$PREFIX/bin/${PRGNAM}
2023-03-06 10:42:39 +01:00
cd $PKG$PREFIX/bin/
cat <<EOF > steam
#!/bin/bash
$PREFIX/bin/conty steam "\$@"
EOF
for prg in wine winetricks lutris playonlinux4; do
ln -s ${PRGNAM} $prg
done
chmod +x $PKG$PREFIX/bin/*
2021-04-26 00:07:07 +02:00
( cd $PKG
find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
)
mkdir -p $PKG/install
cat <<EOF > $PKG/install/slack-desc
# HOW TO EDIT
THIS FILE:
# The "handy ruler" below makes it easier to edit a package description. Line
# up the first '|' above the ':' following the base package name, and the '|'
# on the right side marks the last column you can put a character in. You must
# make exactly 11 lines for the formatting to be correct. It's also
# customary to leave one space after the ':'.
|-----handy-ruler--------------------------------------------------------|
$PRGNAM: $PRGNAM (Easy to use non-root container packed into a single executable)
$PRGNAM:
$PRGNAM: a portable Arch Linux distro packed into a single executable that can
$PRGNAM: be used to run any applications
$PRGNAM:
$PRGNAM:
$PRGNAM:
$PRGNAM:
$PRGNAM:
$PRGNAM: https://github.com/${GITHUB_REPO}
2021-04-26 00:07:07 +02:00
$PRGNAM:
EOF
cd $PKG
rm -f $PKG/{,usr/}lib$(uname -m | grep -o 64)/*.la
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION${EDITION}-$ARCH-$BUILD$TAG.txz