2021-06-15 10:26:26 +02:00
|
|
|
|
#!/bin/bash
|
2019-09-05 08:57:50 +02:00
|
|
|
|
|
|
|
|
|
CWD=$(pwd)
|
|
|
|
|
|
|
|
|
|
PRGNAM=$(basename $CWD)
|
2021-04-12 16:25:33 +02:00
|
|
|
|
VERSION=${VERSION:-$(curl "https://aur.archlinux.org/cgit/aur.git/plain/PKGBUILD?h=minecraft-launcher" | grep "pkgver=" | grep -o "[0-9]*")}
|
2020-02-26 18:23:13 +01:00
|
|
|
|
|
2019-09-05 08:57:50 +02:00
|
|
|
|
ARCH=$(uname -m)
|
|
|
|
|
BUILD=${BUILD:-1}
|
2020-06-25 11:23:11 +02:00
|
|
|
|
TAG=${TAG:-gwh}
|
2019-09-05 08:57:50 +02:00
|
|
|
|
TMP=${TMP:-/tmp/$TAG}
|
|
|
|
|
PKG=$TMP/pkg-$PRGNAM
|
|
|
|
|
OUTPUT=${OUTPUT:-/tmp}
|
|
|
|
|
|
2022-01-22 19:52:02 +01:00
|
|
|
|
REPOSITORY=${REPOSITORY:-/home/installs/SlackBuilds/_repositories/$PRGNAM}
|
2021-09-29 12:57:50 +02:00
|
|
|
|
|
|
|
|
|
mkdir -p $REPOSITORY
|
|
|
|
|
|
|
|
|
|
[ ! -e $REPOSITORY/minecraft-launcher_${VERSION}.tar.gz ] && wget -c -O $REPOSITORY/minecraft-launcher_${VERSION}.tar.gz https://launcher.mojang.com/download/linux/x86_64/minecraft-launcher_${VERSION}.tar.gz
|
|
|
|
|
[ ! -e $REPOSITORY/minecraft-launcher.svg ] && wget -c -O $REPOSITORY/minecraft-launcher.svg https://launcher.mojang.com/download/minecraft-launcher.svg
|
2019-09-05 08:57:50 +02:00
|
|
|
|
rm -fr $PKG
|
|
|
|
|
mkdir -p $PKG/opt/${PRGNAM}
|
|
|
|
|
|
2021-09-29 12:57:50 +02:00
|
|
|
|
tar xvf $REPOSITORY/minecraft-launcher_${VERSION}.tar.gz -C $PKG/opt/
|
2019-09-05 08:57:50 +02:00
|
|
|
|
|
2021-09-29 12:57:50 +02:00
|
|
|
|
rm $REPOSITORY/minecraft-launcher_${VERSION}.tar.gz
|
2019-09-05 08:57:50 +02:00
|
|
|
|
|
|
|
|
|
mkdir -p $PKG/usr/bin
|
|
|
|
|
cd $PKG/usr/bin
|
|
|
|
|
ln -s ../../opt/minecraft-launcher/minecraft-launcher
|
|
|
|
|
|
2020-05-24 14:29:28 +02:00
|
|
|
|
mkdir -p $PKG/usr/share/icons/hicolor/symbolic/apps/
|
2021-09-29 12:57:50 +02:00
|
|
|
|
cp $REPOSITORY/minecraft-launcher.svg $PKG/usr/share/icons/hicolor/symbolic/apps/
|
2020-05-24 14:29:28 +02:00
|
|
|
|
|
|
|
|
|
mkdir -p $PKG/usr/share/applications/
|
|
|
|
|
cat <<EOF > $PKG/usr/share/applications/minecraft-launcher.desktop
|
|
|
|
|
[Desktop Entry]
|
|
|
|
|
Type=Application
|
|
|
|
|
Version=${VERSION}
|
|
|
|
|
Name=Minecraft Launcher
|
|
|
|
|
Comment=Official Minecraft Launcher
|
|
|
|
|
Exec=/opt/minecraft-launcher/minecraft-launcher
|
|
|
|
|
Path=/opt/minecraft-launcher/
|
|
|
|
|
Icon=minecraft-launcher
|
|
|
|
|
Terminal=false
|
|
|
|
|
Categories=Game;Application;
|
|
|
|
|
EOF
|
2019-09-05 08:57:50 +02:00
|
|
|
|
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} (Game)
|
|
|
|
|
${PRGNAM}:
|
|
|
|
|
${PRGNAM}: WHAT IS MINECRAFT?
|
|
|
|
|
${PRGNAM}: IT’S A GAME ABOUT PLACING BLOCKS AND GOING ON ADVENTURES
|
|
|
|
|
${PRGNAM}:
|
|
|
|
|
${PRGNAM}: It’s set in infinitely-generated worlds of wide open terrain - icy
|
|
|
|
|
${PRGNAM}: mountains, swampy bayous, vast pastures and much more - filled with
|
|
|
|
|
${PRGNAM}: secrets, wonders and peril!
|
|
|
|
|
${PRGNAM}:
|
|
|
|
|
${PRGNAM}:
|
|
|
|
|
${PRGNAM}: ${PRGNAM} home: http://minecraft.net/
|
|
|
|
|
EOF
|
|
|
|
|
|
|
|
|
|
cd $PKG
|
|
|
|
|
rm -f $PKG/{,usr/}lib$(uname -m | grep -o 64)/*.la
|
|
|
|
|
/sbin/makepkg -l y -c n ${OUTPUT}/${PRGNAM}-${VERSION}-${ARCH}-${BUILD}${TAG}.txz
|