public
Last active

Install and update steam on Debian

  • Download Gist
steam-debian-installer
Shell
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110
#!/bin/bash
 
# Last update:
# - 07/03/13
 
# What you need to run this script:
# - equivs in order to build jockey-common
# - curl
# - libfile-fcntllock-perl (optional), dpkg will print a
# warning if not installed but works without it
 
# This script will:
# - Download the Steam Ubuntu package
# - Make libc6 dependency version compatible with Debian
# - Remove the apt entry since you won't be able to update
# steam through apt anyway
# - Build a dummy package (if not already installed):
# jockey-common to prevent steam from
# trying to install it every time you launch steam.
 
# Note:
# - Never tested on amd64, I have no idea if it works
 
LIBC6UBUNTU="true"
# if false you will have to provide libc6 >= 2.15 yourself
 
if ! dpkg-query -l ttf-mscorefonts-installer >/dev/null 2>&1
then
echo "I would recommend the package ttf-mscorefonts-installer from the contrib section to get nice fonts in steam"
fi
 
TMP="/tmp/steam-debian-installer"
STEAMURL="http://repo.steampowered.com/steam/archive/precise/steam_latest.deb"
LIBC6URL="http://mirrors.us.kernel.org/ubuntu//pool/main/e/eglibc/libc6_2.15-0ubuntu10.3_i386.deb"
JOCKEY="Package: jockey-common\nSource: jockey\nVersion: 0.9.7-0ubuntu7.4\nArchitecture: all\nSection: admin\nPriority: optional"
 
if [[ ! -f /usr/bin/equivs-build ]]
then
echo "In order to run this script you must install equivs"
echo "Press enter to install"
read
su -c 'apt-get install equivs'
fi
 
rm -fr $TMP && mkdir $TMP && cd $TMP
 
echo "Downloading steam from $STEAMURL"
if [[ ! $(curl --write-out %{http_code} -o steam_latest.deb -# $STEAMURL) == 200 ]]
then
echo "Error while downloading, exiting"
exit 1
fi
 
if [[ $LIBC6UBUNTU == true ]]
then
echo "Downloading libc6 from $LIBC6URL"
if [[ ! $(curl --write-out %{http_code} -o libc6_ubuntu.deb -# $LIBC6URL) == 200 ]]
then
echo "Error while downloading, exiting"
exit 1
fi
fi
 
echo "Patching and re-building steam..."
dpkg -x steam_latest.deb steam
dpkg -e steam_latest.deb steam/DEBIAN
rm -fr steam/etc/apt/sources.list.d
sed -i '/steam.list/d' steam/DEBIAN/conffiles
sed -i 's/libc6.*)/libc6/g' steam/DEBIAN/control
sed -i '/^Version:/ s/$/-debian/' steam/DEBIAN/control
 
if [[ $LIBC6UBUNTU == true ]]
then
dpkg -x libc6_ubuntu.deb libc6_ubuntu
cp -r libc6_ubuntu/lib/i386-linux-gnu steam/usr/lib/steam/
sed -i 's\Exec=/usr/bin/steam\Exec=/usr/bin/steam-debian\g' steam/usr/share/applications/steam.desktop
sed -i 's/Exec=steam/Exec=steam-debian/g' steam/usr/share/applications/steam.desktop
echo -e '#!/usr/bin/env bash\nexport LD_LIBRARY_PATH=/usr/lib/steam/i386-linux-gnu\nsteam "$@"' > steam/usr/bin/steam-debian
chmod +x steam/usr/bin/steam-debian
fi
 
DEBS="steam.deb"
 
if dpkg -b steam/ >/dev/null
then
rm -f steam_latest.deb
else
echo "Error while building the steam package, exiting"
exit 1
fi
 
if ! dpkg-query -l jockey-common >/dev/null 2>&1
then
echo -e $JOCKEY > jockey
echo "Building jockey-common..."
if equivs-build jockey >/dev/null
then
DEBS="$DEBS jockey-common_0.9.7-0ubuntu7.4_all.deb"
else
echo "Error while building the jockey-common package, exiting"
exit 1
fi
else
echo "jockey-common already installed, skipping."
fi
 
echo -e "\nThe following packages will be installed:\n$DEBS\n"
su -c "dpkg -i $DEBS; apt-get -f install"
rm -fr $TMP
exit 0
Package: steam
Version: 1.0.0.22
Architecture: i386

sid, amd64

# Depends: multiarch-support (>= 2.15-0ubuntu10.2), libc6 (>= 2.15)
$ aptitude install multiarch-support/experimental
$ aptitude install -t experimental libc6:i386
$ apt-cache policy multiarch-support libc6:i386
multiarch-support:
 *** 2.16-0experimental1 0
          1 http://http.debian.net/debian/ experimental/main amd64 Packages
        100 /var/lib/dpkg/status
     2.13-38 0
        500 http://http.debian.net/debian/ sid/main amd64 Packages
libc6:i386:
 *** 2.16-0experimental1 0
          1 http://http.debian.net/debian/ experimental/main i386 Packages
        100 /var/lib/dpkg/status
     2.13-38 0
        500 http://http.debian.net/debian/ sid/main i386 Packages
Other dependencies
$ aptitude install libogg0:i386 libcurl3-gnutls:i386 libpixman-1-0:i386 libsdl1.2debian:i386 libtheora0:i386 libudev0:i386 libvorbis0a:i386 libvorbisenc2:i386 libvorbisfile3:i386 libcairo2:i386 libcups2:i386 libgdk-pixbuf2.0-0:i386 libglib2.0-0:i386 libgtk2.0-0:i386 libnspr4:i386 libnss3:i386 libopenal1:i386 libpango1.0-0:i386

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.