minecraft: initial import

This commit is contained in:
Danny Rawlins 2018-11-20 07:41:44 +11:00
parent 615db602f6
commit 8d985dcf74
7 changed files with 88 additions and 0 deletions

10
minecraft/.footprint Normal file
View File

@ -0,0 +1,10 @@
drwxr-xr-x root/root usr/
drwxr-xr-x root/root usr/bin/
-rwxr-xr-x root/root usr/bin/minecraft
drwxr-xr-x root/root usr/share/
drwxr-xr-x root/root usr/share/applications/
-rw-r--r-- root/root usr/share/applications/minecraft.desktop
drwxr-xr-x root/root usr/share/minecraft/
-rw-r--r-- root/root usr/share/minecraft/Minecraft.jar
drwxr-xr-x root/root usr/share/pixmaps/
-rw-r--r-- root/root usr/share/pixmaps/minecraft.png

8
minecraft/.signature Normal file
View File

@ -0,0 +1,8 @@
untrusted comment: verify with /etc/ports/contrib.pub
RWSagIOpLGJF33tu4afnaC2qsQGvMHL3sZK1fcNTEZU86K1lcpySRZuTCjeb2xE4F8nPercH7Nmwv9MQC/q5Sa2bh+VZdNLezAQ=
SHA256 (Pkgfile) = 67c015a2a6d16730045b2989e20dbf9f6978ce755129882b17ff32125f4ab65d
SHA256 (.footprint) = 5a11c9e7c862c2549c8f05c16081526d897f06ab5ab1afb958119b1fd0075219
SHA256 (Minecraft.jar) = e8d90b2637b141b556670d8460d317aadb6e4f2e644e519995c428800b25f212
SHA256 (minecraft) = 0666652f867b10abc212b8e0b0f3063a084b2321b4d189d3df128801beec225c
SHA256 (minecraft.desktop) = 7b242aeba482625132178c38b177f6c875d51dd34411a856025effcd2724c84f
SHA256 (minecraft.png) = 037d7d3572231d8beae2cba8d61d46a7162ff21947817042e2775b8bc5c10a3d

20
minecraft/Pkgfile Normal file
View File

@ -0,0 +1,20 @@
# Description: An open-world game whose gameplay revolves around breaking and placing blocks.
# URL: http://www.minecraft.net/
# Maintainer: Danny Rawlins, crux at romster dot me
# Depends on: openjdk8
name=minecraft
# curl -sI http://s3.amazonaws.com/Minecraft.Download/launcher/Minecraft.jar | awk '/^Last-Modified:/ { print $3 " " $4 " " $5}' | xargs -0 date +"%Y%m%d" -d
version=20130712
release=1
source=(http://s3.amazonaws.com/Minecraft.Download/launcher/Minecraft.jar
minecraft minecraft.desktop minecraft.png)
build() {
install -D -m 0755 minecraft $PKG/usr/bin/minecraft
install -D -m 0644 Minecraft.jar $PKG/usr/share/minecraft/Minecraft.jar
# Desktop launcher with icon
install -D -m 0644 minecraft.desktop $PKG/usr/share/applications/minecraft.desktop
install -D -m 0644 minecraft.png $PKG/usr/share/pixmaps/minecraft.png
}

11
minecraft/README Normal file
View File

@ -0,0 +1,11 @@
PACKAGES NOTES
This is the full version of the game, you need a valid account to play it.
To create an account, connect to http://www.minecraft.net/ and buy the full
game from the store. You should then be able to log in and play.
The game will auto update and store the updated binary and game configuration
in ~/.minecraft
For Java 9 users, please check the following link: http://bit.ly/2BAzKUP for
details about how to run the game properly.

30
minecraft/minecraft Normal file
View File

@ -0,0 +1,30 @@
#!/bin/sh
# We need to force Java 8 here since both Java 7 and 9 currently causes the game to crash
export PATH=/usr/lib/jvm/java-8-openjdk/jre/bin/:/usr/lib/jvm/java-8-jre/jre/bin/:$PATH
# Since launching the minecraft launch from the home directory bypass the update mechanism, I'm adding this
# small piece of code that will do a checksum of the versions.json file provided by mojang, if a new version
# of the game is out, I force a download of the launcher just to keep everyone up to date
# those 2 can be overrided if you want
MC_VERSION_URL=${MC_VERSION_URL:-"https://launchermeta.mojang.com/mc/game/version_manifest.json"}
MC_SUM_FILE=${MC_SUM_FILE:-"${HOME}/.minecraft/versions.sum"}
# compute sums
MC_VERSION_SUM=$( curl -s "${MC_VERSION_URL}" | sha256sum | cut -f 1 -d " " )
MC_CURRENT_SUM=$( cat "$MC_SUM_FILE" 2>/dev/null )
if [ "$MC_VERSION_SUM" != "$MC_CURRENT_SUM" ]; then
export MC_FORCE_UPDATE=1
echo "$MC_VERSION_SUM" > "$MC_SUM_FILE"
fi
if [ -e "${HOME}/.minecraft/launcher.jar" ] && [ -z "$MC_FORCE_UPDATE" ]; then
exec java -jar "${HOME}/.minecraft/launcher.jar" $@
else
exec java -jar /usr/share/minecraft/Minecraft.jar $@
fi
unset MC_FORCE_UPDATE

View File

@ -0,0 +1,9 @@
[Desktop Entry]
Name=Minecraft
GenericName=Minecraft
Comment=A game about placing blocks while running from skeletons.
Exec=minecraft
Icon=minecraft
Terminal=false
Type=Application
Categories=Game;

BIN
minecraft/minecraft.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 50 KiB