From d403d12d6abfd9c89c2aaedc6e18b39fd608d798 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Mr=C3=A1zek?= Date: Sun, 28 Jun 2015 11:25:32 +0200 Subject: [PATCH] GH-1096 simple debian/ubuntu wrapper package Built with `fakeroot dpkg-deb --build multimc_1.0-1` --- .../ubuntu/multimc_1.0-1/DEBIAN/control | 11 + .../ubuntu/multimc_1.0-1/DEBIAN/postrm | 3 + .../ubuntu/multimc_1.0-1/opt/multimc/icon.svg | 1993 +++++++++++++++++ .../ubuntu/multimc_1.0-1/opt/multimc/run.sh | 26 + .../usr/share/applications/multimc.desktop | 16 + 5 files changed, 2049 insertions(+) create mode 100644 application/package/ubuntu/multimc_1.0-1/DEBIAN/control create mode 100755 application/package/ubuntu/multimc_1.0-1/DEBIAN/postrm create mode 100644 application/package/ubuntu/multimc_1.0-1/opt/multimc/icon.svg create mode 100755 application/package/ubuntu/multimc_1.0-1/opt/multimc/run.sh create mode 100755 application/package/ubuntu/multimc_1.0-1/usr/share/applications/multimc.desktop diff --git a/application/package/ubuntu/multimc_1.0-1/DEBIAN/control b/application/package/ubuntu/multimc_1.0-1/DEBIAN/control new file mode 100644 index 00000000..6d7bc057 --- /dev/null +++ b/application/package/ubuntu/multimc_1.0-1/DEBIAN/control @@ -0,0 +1,11 @@ +Package: multimc +Version: 1.0.1 +Architecture: amd64 +Maintainer: Petr Mrázek +Section: games +Priority: optional +Installed-Size: 75 +Depends: zenity, default-jre +Homepage: http://multimc.org +Description: A local install wrapper for MultiMC + diff --git a/application/package/ubuntu/multimc_1.0-1/DEBIAN/postrm b/application/package/ubuntu/multimc_1.0-1/DEBIAN/postrm new file mode 100755 index 00000000..f9bbc8a7 --- /dev/null +++ b/application/package/ubuntu/multimc_1.0-1/DEBIAN/postrm @@ -0,0 +1,3 @@ +#!/bin/sh +set -e +update-desktop-database diff --git a/application/package/ubuntu/multimc_1.0-1/opt/multimc/icon.svg b/application/package/ubuntu/multimc_1.0-1/opt/multimc/icon.svg new file mode 100644 index 00000000..178509ac --- /dev/null +++ b/application/package/ubuntu/multimc_1.0-1/opt/multimc/icon.svg @@ -0,0 +1,1993 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/application/package/ubuntu/multimc_1.0-1/opt/multimc/run.sh b/application/package/ubuntu/multimc_1.0-1/opt/multimc/run.sh new file mode 100755 index 00000000..3d934037 --- /dev/null +++ b/application/package/ubuntu/multimc_1.0-1/opt/multimc/run.sh @@ -0,0 +1,26 @@ +#!/bin/bash + +INSTDIR=~/MultiMC + +deploy() { + mkdir -p $INSTDIR + cd ${INSTDIR} + + wget --progress=dot:force "http://files.multimc.org/downloads/mmc-stable-lin64.tar.gz" 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 mmc-stable-lin64.tar.gz --strip-components=2 + rm mmc-stable-lin64.tar.gz + chmod +x MultiMC + ./MultiMC +} + +runmmc() { + cd ${INSTDIR} + ./MultiMC +} + +if [[ ! -f ${INSTDIR}/MultiMC ]]; then + deploy +else + runmmc +fi diff --git a/application/package/ubuntu/multimc_1.0-1/usr/share/applications/multimc.desktop b/application/package/ubuntu/multimc_1.0-1/usr/share/applications/multimc.desktop new file mode 100755 index 00000000..6002e686 --- /dev/null +++ b/application/package/ubuntu/multimc_1.0-1/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=