GH-1096 make ubuntu package work on both 32bit and 64bit machines

This commit is contained in:
Petr Mrázek 2015-06-28 22:44:53 +02:00
parent d403d12d6a
commit bbba63eca5
7 changed files with 46 additions and 28 deletions

View File

@ -1,26 +0,0 @@
#!/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

View File

@ -1,6 +1,6 @@
Package: multimc
Version: 1.0.1
Architecture: amd64
Version: 1.1-1
Architecture: all
Maintainer: Petr Mrázek <peterix@gmail.com>
Section: games
Priority: optional

View File

Before

Width:  |  Height:  |  Size: 52 KiB

After

Width:  |  Height:  |  Size: 52 KiB

View File

@ -0,0 +1,32 @@
#!/bin/bash
INSTDIR=~/.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 "http://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
./MultiMC
}
runmmc() {
cd ${INSTDIR}
./MultiMC
}
if [[ ! -f ${INSTDIR}/MultiMC ]]; then
deploy
else
runmmc
fi

View File

@ -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 `.dekstop` file, an icon, and a simple script that does the heavy lifting.
# How to build this?
You need dpkg utils and then run:
```
fakeroot dpkg-deb --build multimc_1.1-1
```
Replace the version with whatever is appropriate.