package latest steam client always (beta or stable)
This commit is contained in:
parent
bd72cd9a87
commit
b6b9fc7025
2 changed files with 168 additions and 0 deletions
142
y/steam/SlackBuild
Executable file
142
y/steam/SlackBuild
Executable file
|
@ -0,0 +1,142 @@
|
|||
#!/bin/sh
|
||||
|
||||
# Slackware build script for steam
|
||||
|
||||
# Copyright 2016 Talos Thoren
|
||||
# All rights reserved.
|
||||
# Copyright 2019,20 Christoph Willing, Brisbane, Australia
|
||||
# Copyright 2020 Gwenhael Le Moine
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use of this script, with or without modification, is
|
||||
# permitted provided that the following conditions are met:
|
||||
#
|
||||
# 1. Redistributions of this script must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||
# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
|
||||
# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
|
||||
# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
||||
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
|
||||
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
CWD=$(pwd)
|
||||
|
||||
PRGNAM=$(basename $CWD)
|
||||
#VERSION=${VERSION:-1.0.0.63}
|
||||
BRANCH=${BRANCH:-beta} # stable ; beta
|
||||
BUILD=${BUILD:-1}
|
||||
TAG=${TAG:-gwh}
|
||||
|
||||
if [ -z "$ARCH" ]; then
|
||||
case "$( uname -m )" in
|
||||
i?86) ARCH=i586 ;;
|
||||
arm*) ARCH=arm ;;
|
||||
*) ARCH=$( uname -m ) ;;
|
||||
esac
|
||||
fi
|
||||
|
||||
CWD=$(pwd)
|
||||
TMP=${TMP:-/tmp/$TAG}
|
||||
PKG=$TMP/package-$PRGNAM
|
||||
OUTPUT=${OUTPUT:-/tmp}
|
||||
|
||||
set -e
|
||||
|
||||
rm -rf $PKG
|
||||
mkdir -p $TMP $PKG $OUTPUT
|
||||
cd $TMP
|
||||
rm -rf ${PRGNAM}-launcher
|
||||
|
||||
[ -e $CWD/steam_latest-$BRANCH.tar.gz ] && rm $CWD/steam_latest-$BRANCH.tar.gz
|
||||
wget -c https://repo.steampowered.com/steam/archive/precise/steam_latest-$BRANCH.tar.gz -O $CWD/steam_latest-$BRANCH.tar.gz
|
||||
tar xvf $CWD/steam_latest-$BRANCH.tar.gz
|
||||
cd ${PRGNAM}-launcher
|
||||
VERSION=$(cat client-versions.json | grep -o "[0-9.]*" | sed 'N;s/\n/_/')
|
||||
|
||||
# Use Slackware-specific installation directories
|
||||
patch -p0 < $CWD/patch-slackdirs.diff
|
||||
|
||||
chown -R root:root .
|
||||
find -L . \
|
||||
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
|
||||
-o -perm 511 \) -exec chmod 755 {} \; -o \
|
||||
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
|
||||
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
|
||||
|
||||
# alienBOB's trick for unfound system apps
|
||||
sed -i -e '\/usr\/bin\/env\ bash/{N;s#$#\nexport PATH="/usr/lib/steam/local:$PATH"\n#}' bin_steam.sh
|
||||
mkdir -p $PKG/usr/lib/steam/local
|
||||
ln -sf /sbin/pidof $PKG/usr/lib/steam/local/pidof
|
||||
ln -sf /sbin/lspci $PKG/usr/lib/steam/local/lspci
|
||||
|
||||
sed -i -e "s/distribution.\\\n/distribution.\\\n Actually, don't worry - this is Slackware\!\\\n\\\n/" bin_steamdeps.py
|
||||
make install DESTDIR=$PKG VERSION=$VERSION
|
||||
|
||||
find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
|
||||
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
|
||||
|
||||
find $PKG/usr/man -type f -exec gzip -9 {} \;
|
||||
for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
|
||||
|
||||
mkdir -p $PKG/lib/udev/rules.d
|
||||
install -p -m 0644 subprojects/steam-devices/*.rules $PKG/lib/udev/rules.d/
|
||||
sed -i -e 's/^KERNEL=="uinput".*/& GROUP="plugdev"/' $PKG/lib/udev/rules.d/60-steam-input.rules
|
||||
|
||||
mkdir -p $PKG/usr/doc/$PRGNAM
|
||||
cp subprojects/steam-devices/LICENSE $CWD/SlackBuild $PKG/usr/doc/$PRGNAM/
|
||||
|
||||
mkdir -p $PKG/install
|
||||
cat <<EOF > $PKG/install/slack-desc
|
||||
# HOW TO EDIT THIS FILE:
|
||||
# The "handy ruler" below makes it easier to edit a package description.
|
||||
# Line up the first '|' above the ':' following the base package name, and
|
||||
# the '|' on the right side marks the last column you can put a character in.
|
||||
# You must make exactly 11 lines for the formatting to be correct. It's also
|
||||
# customary to leave one space after the ':' except on otherwise blank lines.
|
||||
|
||||
|-----handy-ruler------------------------------------------------------|
|
||||
steam: steam (digital distribution)
|
||||
steam:
|
||||
steam: Steam is an internet-based digital distribution, digital rights
|
||||
steam: management, multiplayer, and social networking platform developed by
|
||||
steam: Valve Corporation.
|
||||
steam: Steam provides the user with installation and automatic updating of
|
||||
steam: games on multiple computers, and community features such as friends
|
||||
steam: lists and groups, cloud saving, and in-game voice and chat
|
||||
steam: functionality.
|
||||
steam:
|
||||
steam: Project URL: http://store.steampowered.com
|
||||
EOF
|
||||
|
||||
cat <<EOF > $PKG/install/doinst.sh
|
||||
# Update the desktop database:
|
||||
if [ -x usr/bin/update-desktop-database ]; then
|
||||
/usr/bin/update-desktop-database usr/share/applications > /dev/null 2>&1
|
||||
fi
|
||||
|
||||
# Update hicolor theme cache:
|
||||
if [ -d usr/share/icons/hicolor ]; then
|
||||
if [ -x /usr/bin/gtk-update-icon-cache ]; then
|
||||
/usr/bin/gtk-update-icon-cache -f -t usr/share/icons/hicolor 1> /dev/null 2> /dev/null
|
||||
fi
|
||||
fi
|
||||
|
||||
# Update the mime database:
|
||||
if [ -x usr/bin/update-mime-database ]; then
|
||||
/usr/bin/update-mime-database usr/share/mime >/dev/null 2>&1
|
||||
fi
|
||||
|
||||
# Reload the udev rules to include our newly installed steam rules
|
||||
if [ -x /sbin/udevadm ]; then
|
||||
/sbin/udevadm control --reload
|
||||
fi
|
||||
EOF
|
||||
|
||||
cd $PKG
|
||||
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-txz}
|
26
y/steam/patch-slackdirs.diff
Normal file
26
y/steam/patch-slackdirs.diff
Normal file
|
@ -0,0 +1,26 @@
|
|||
--- Makefile.orig 2020-03-20 03:13:39.000000000 +1000
|
||||
+++ Makefile 2020-04-23 18:31:43.521950531 +1000
|
||||
@@ -14,10 +14,10 @@
|
||||
ln -fns $(pkglibdir)/bin_steamdeps.py $(DESTDIR)$(bindir)/$(PACKAGE)deps
|
||||
|
||||
install-docs:
|
||||
- install -d -m 755 $(DESTDIR)$(PREFIX)/share/doc/$(PACKAGE)/
|
||||
- install -p -m 644 README steam_subscriber_agreement.txt $(DESTDIR)$(PREFIX)/share/doc/$(PACKAGE)/
|
||||
- install -d -m 755 $(DESTDIR)$(PREFIX)/share/man/man6/
|
||||
- install -m 644 $(PACKAGE).6 $(DESTDIR)$(PREFIX)/share/man/man6/
|
||||
+ install -d -m 755 $(DESTDIR)$(PREFIX)/doc/$(PACKAGE)-$(VERSION)/
|
||||
+ install -p -m 644 README steam_subscriber_agreement.txt $(DESTDIR)$(PREFIX)/doc/$(PACKAGE)-$(VERSION)/
|
||||
+ install -d -m 755 $(DESTDIR)$(PREFIX)/man/man6/
|
||||
+ install -m 644 $(PACKAGE).6 $(DESTDIR)$(PREFIX)/man/man6/
|
||||
|
||||
install-icons:
|
||||
install -d -m 755 $(DESTDIR)$(PREFIX)/share/icons/hicolor/16x16/apps/
|
||||
@@ -39,7 +39,7 @@
|
||||
install -p -m 644 bootstraplinux_ubuntu12_32.tar.xz $(DESTDIR)$(PREFIX)/lib/$(PACKAGE)/
|
||||
|
||||
install-desktop:
|
||||
- install -d -m 755 $(DESTDIR)$(PREFIX)/share/applications/
|
||||
+ install -d -m 755 $(DESTDIR)$(datadir)/applications/
|
||||
install -d -m 755 $(DESTDIR)$(pkglibdir)/
|
||||
install -p -m 644 $(PACKAGE).desktop $(DESTDIR)$(pkglibdir)
|
||||
ln -fns $(pkglibdir)/$(PACKAGE).desktop $(DESTDIR)$(datadir)/applications/
|
Loading…
Reference in a new issue