diff options
author | Eric Hameleers <alien@slackware.com> | 2013-01-29 11:39:46 +0000 |
---|---|---|
committer | Eric Hameleers <alien@slackware.com> | 2013-01-29 11:39:46 +0000 |
commit | 00c36c4cc7f92c516b0915475dd704bf4cc77059 (patch) | |
tree | 0fc1321a6e3e066612ac041696fbea3e92451d4e /steamclient/build | |
parent | 91c23806fb50e147e7aa862d3688160c8d4dacfa (diff) | |
download | asb-00c36c4cc7f92c516b0915475dd704bf4cc77059.tar.gz asb-00c36c4cc7f92c516b0915475dd704bf4cc77059.tar.xz |
This version of the script produces a working package
Updated to 1.0.0.22
Diffstat (limited to 'steamclient/build')
-rwxr-xr-x | steamclient/build/steamclient.SlackBuild | 63 |
1 files changed, 42 insertions, 21 deletions
diff --git a/steamclient/build/steamclient.SlackBuild b/steamclient/build/steamclient.SlackBuild index 6044075a..951e7727 100755 --- a/steamclient/build/steamclient.SlackBuild +++ b/steamclient/build/steamclient.SlackBuild @@ -1,6 +1,6 @@ #!/bin/sh # $Id$ -# Copyright 2012 Eric Hameleers, Eindhoven, NL +# Copyright 2012, 2013 Eric Hameleers, Eindhoven, NL # All rights reserved. # # Permission to use, copy, modify, and distribute this software for @@ -32,6 +32,8 @@ # Changelog: # 20121216-1: 16/Dec/2012 by Eric Hameleers <alien@slackware.com> # * Initial build. +# 1.0.0.22-1: 28/jan/2013 by Eric Hameleers <alien@slackware.com> +# * Update. # # Run 'sh steamclient.SlackBuild' to build a Slackware package. # The package (.tgz) and .txt file as well as build logs are created in /tmp . @@ -42,8 +44,8 @@ # Set initial variables: PRGNAM=steamclient -VERSION=${VERSION:-20121216} -ARCH=i486 +VERSION=${VERSION:-1.0.0.22} # Use "LATEST" to just dowload the latest version. +ARCH=i386 BUILD=${BUILD:-1} TAG=${TAG:-alien} @@ -55,9 +57,14 @@ TMP=${TMP:-/tmp/build} PKG=$TMP/package-$PRGNAM OUTPUT=${OUTPUT:-/tmp} -# Input URL: http://media.steampowered.com/client/installer/steam.deb -SOURCE="$SRCDIR/steam-${VERSION}.deb" -SRCURL="http://media.steampowered.com/client/installer/steam.deb" +if [ "$VERSION" = "LATEST" ]; then + # We'll re-define VERSION later. + SRCURL="http://media.steampowered.com/client/installer/steam.deb" + SOURCE="$SRCDIR/steam_latest.deb" +else + SRCURL="http://repo.steampowered.com/steam/archive/precise/steam_${VERSION}_${ARCH}.deb" + SOURCE="$SRCDIR/steam_${VERSION}_${ARCH}.deb" +fi ## ## --- with a little luck, you won't have to edit below this point --- ## @@ -115,19 +122,40 @@ echo "|| $PRGNAM-$VERSION" echo "++" cd $TMP/tmp-$PRGNAM + echo "Extracting the source archive(s) for $PRGNAM..." ar x ${SOURCE} # Move the binaries into place: tar -C $PKG -xvf data.tar.gz rm -r $PKG/etc/apt -# Take care of the post-install commands: +# We don't use apt or dpkg or whatever: +cat << EOT > $PKG/usr/bin/steamdeps +#!/bin/sh +echo "Check the 'deps' directory where you downloaded this package and install/upgrade the packages you find there. If you run multilib, you also have to install/upgrade the packages in the 'deps/multilib' subdirectory." +exit 0 +EOT +# Remove some debian specific stuff: mkdir $PKG/install tar -C $PKG/install -xvf control.tar.gz rm -f $PKG/install/{conffiles,md5sums} -mv $PKG/install/{postinst,doinst.sh} -mkdir -p $PKG/usr/doc/$PRGNAM -mv $PKG/install/control $PKG/usr/doc/$PRGNAM/ -# Take care of the man page: +# Version check in case we downloaded the "latest" client: +if [ "$VERSION" = "LATEST" ]; then + echo -n "Changing package version from '$VERSION' to" + VERSION=$(cat $PKG/install/control | grep "^Version: " | cut -d' ' -f2-) + echo " '$VERSION'." +fi +mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION +mv $PKG/install/control $PKG/usr/doc/$PRGNAM-$VERSION/ +mv $PKG/install/postinst $PKG/usr/doc/$PRGNAM-$VERSION/postinst.dist +# Merge in the .deb's own docs: +mv $PKG/usr/share/doc/steam/* $PKG/usr/doc/$PRGNAM-$VERSION/ +rm -r $PKG/usr/share/doc +cp -a $SRCDIR/README.Slackware $PKG/usr/doc/$PRGNAM-$VERSION || true +cat $SRCDIR/$(basename $0) > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild +chown -R root:root $PKG/usr/doc/$PRGNAM-$VERSION +find $PKG/usr/doc -type f -exec chmod 644 {} \; + +# Take care of the man page location: mv $PKG/usr/share/man $PKG/usr/ cd ${PKG} @@ -141,10 +169,11 @@ export SDL_AUDIODRIVER=alsa\ # Add any custom variable exports here\ [ -f ${HOME}/.steam4slackware ] \&\& . ${HOME}/.steam4slackware\ # --- End Slackware mod ---' $PKG/usr/bin/steam -sed -i -e "s/install_extra_packages /#@/" $PKG/usr/bin/steam -sed -i -e 's/xterm/${TERM}/' $PKG/usr/bin/steam # We need to add a symlink to /sbin/pidof in order to make it be found: sed -i -e '/bin\/bash/{N;s#$#\nexport PATH="/usr/lib/steam/local:$PATH"#}' $PKG/usr/bin/steam +sed -i -e 's/xterm/${TERM}/' $PKG/usr/bin/steam + +# Our 'pidof' workaround: mkdir $PKG/usr/lib/steam/local ln -sf /sbin/pidof $PKG/usr/lib/steam/local/pidof @@ -189,16 +218,8 @@ fi if [ -x usr/bin/update-mime-database ]; then chroot . /usr/bin/update-mime-database usr/share/mime >/dev/null 2>&1 fi - EOINS -# Add documentation: -mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION -cp -a $SRCDIR/README.Slackware $PKG/usr/doc/$PRGNAM-$VERSION || true -cat $SRCDIR/$(basename $0) > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild -chown -R root:root $PKG/usr/doc/$PRGNAM-$VERSION -find $PKG/usr/doc -type f -exec chmod 644 {} \; - # Add a package description: mkdir -p $PKG/install cat $SRCDIR/slack-desc > $PKG/install/slack-desc |