From b9fd381eee2f7c87e7645046b26dd552dc3cae5c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Mr=C3=A1zek?= Date: Thu, 17 May 2018 23:14:12 +0200 Subject: GH-2268 update the deb package to not depend on latest jre * `openjdk-8-jre` is now recommended * the package now depends on `desktop-file-utils` * the desktop icon has been updated to the current one --- application/package/ubuntu/multimc/DEBIAN/control | 12 + application/package/ubuntu/multimc/DEBIAN/postrm | 3 + .../package/ubuntu/multimc/opt/multimc/icon.svg | 353 +++++++++++++++++++++ .../package/ubuntu/multimc/opt/multimc/run.sh | 33 ++ .../multimc/usr/share/applications/multimc.desktop | 16 + application/package/ubuntu/readme.md | 12 + 6 files changed, 429 insertions(+) create mode 100644 application/package/ubuntu/multimc/DEBIAN/control create mode 100755 application/package/ubuntu/multimc/DEBIAN/postrm create mode 100644 application/package/ubuntu/multimc/opt/multimc/icon.svg create mode 100755 application/package/ubuntu/multimc/opt/multimc/run.sh create mode 100755 application/package/ubuntu/multimc/usr/share/applications/multimc.desktop create mode 100644 application/package/ubuntu/readme.md (limited to 'application/package/ubuntu') 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. -- cgit v1.2.3