diff --git a/application/package/ubuntu/multimc/DEBIAN/control b/application/package/ubuntu/multimc/DEBIAN/control new file mode 100644 index 00000000..158ce5a4 --- /dev/null +++ b/application/package/ubuntu/multimc/DEBIAN/control @@ -0,0 +1,12 @@ +Package: multimc +Version: 1.2-1 +Architecture: all +Maintainer: Petr Mrázek +Section: games +Priority: optional +Installed-Size: 75 +Depends: zenity, desktop-file-utils +Recommends: openjdk-8-jre +Homepage: http://multimc.org +Description: A local install wrapper for MultiMC + diff --git a/application/package/ubuntu/multimc/DEBIAN/postrm b/application/package/ubuntu/multimc/DEBIAN/postrm new file mode 100755 index 00000000..f9bbc8a7 --- /dev/null +++ b/application/package/ubuntu/multimc/DEBIAN/postrm @@ -0,0 +1,3 @@ +#!/bin/sh +set -e +update-desktop-database diff --git a/application/package/ubuntu/multimc/opt/multimc/icon.svg b/application/package/ubuntu/multimc/opt/multimc/icon.svg new file mode 100644 index 00000000..8bb0e289 --- /dev/null +++ b/application/package/ubuntu/multimc/opt/multimc/icon.svg @@ -0,0 +1,353 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + diff --git a/application/package/ubuntu/multimc/opt/multimc/run.sh b/application/package/ubuntu/multimc/opt/multimc/run.sh new file mode 100755 index 00000000..f4f2fa42 --- /dev/null +++ b/application/package/ubuntu/multimc/opt/multimc/run.sh @@ -0,0 +1,33 @@ +#!/bin/bash + +INSTDIR="${XDG_DATA_HOME-$HOME/.local/share}/multimc" + +if [ `getconf LONG_BIT` = "64" ] +then + PACKAGE="mmc-stable-lin64.tar.gz" +else + PACKAGE="mmc-stable-lin32.tar.gz" +fi + +deploy() { + mkdir -p $INSTDIR + cd ${INSTDIR} + + wget --progress=dot:force "https://files.multimc.org/downloads/${PACKAGE}" 2>&1 | sed -u 's/.* \([0-9]\+%\)\ \+\([0-9.]\+.\) \(.*\)/\1\n# Downloading at \2\/s, ETA \3/' | zenity --progress --auto-close --auto-kill --title="Downloading MultiMC..." + + tar -xzf ${PACKAGE} --transform='s,MultiMC/,,' + rm ${PACKAGE} + chmod +x MultiMC +} + +runmmc() { + cd ${INSTDIR} + ./MultiMC +} + +if [[ ! -f ${INSTDIR}/MultiMC ]]; then + deploy + runmmc +else + runmmc +fi diff --git a/application/package/ubuntu/multimc/usr/share/applications/multimc.desktop b/application/package/ubuntu/multimc/usr/share/applications/multimc.desktop new file mode 100755 index 00000000..6002e686 --- /dev/null +++ b/application/package/ubuntu/multimc/usr/share/applications/multimc.desktop @@ -0,0 +1,16 @@ +[Desktop Entry] +Categories=Game; +Exec=/opt/multimc/run.sh +Icon=/opt/multimc/icon.svg +Keywords=game; +MimeType= +Name=MultiMC 5 +Path= +StartupNotify=true +Terminal=false +TerminalOptions= +Type=Application +X-DBUS-ServiceName= +X-DBUS-StartupType= +X-KDE-SubstituteUID=false +X-KDE-Username= diff --git a/application/package/ubuntu/readme.md b/application/package/ubuntu/readme.md new file mode 100644 index 00000000..50ce65fd --- /dev/null +++ b/application/package/ubuntu/readme.md @@ -0,0 +1,12 @@ +# What is this? +A simple ubuntu package for MultiMC that wraps the contains a script that downloads and installs real MultiMC on ubuntu based systems. + +It contains a `.desktop` file, an icon, and a simple script that does the heavy lifting. + +# How to build this? +You need dpkg utils. Rename the `multimc` folder to `multimc_1.2-1` and then run: +``` +fakeroot dpkg-deb --build multimc_1.2-1 +``` + +Replace the version with whatever is appropriate.