diff options
Diffstat (limited to 'games/torcs/torcs.SlackBuild')
-rw-r--r-- | games/torcs/torcs.SlackBuild | 42 |
1 files changed, 25 insertions, 17 deletions
diff --git a/games/torcs/torcs.SlackBuild b/games/torcs/torcs.SlackBuild index 5907061aa9..1949a33f8d 100644 --- a/games/torcs/torcs.SlackBuild +++ b/games/torcs/torcs.SlackBuild @@ -2,17 +2,18 @@ # Slackware build script for torcs -# Written by B. Watson (yalhcru@gmail.com) +# Written by B. Watson (urchlay@slackware.uk) # Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details. +# 20211102 bkw: BUILD=2, new-style icons # 20170704 bkw: fix build on -current cd $(dirname $0) ; CWD=$(pwd) PRGNAM=torcs VERSION=${VERSION:-1.3.7} -BUILD=${BUILD:-1} +BUILD=${BUILD:-2} TAG=${TAG:-_SBo} PKGTYPE=${PKGTYPE:-tgz} @@ -24,9 +25,6 @@ if [ -z "$ARCH" ]; then esac fi -# If the variable PRINT_PACKAGE_NAME is set, then this script will report what -# the name of the created package would be, and then exit. This information -# could be useful to other scripts. if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE" exit 0 @@ -59,11 +57,8 @@ rm -rf $PRGNAM-$VERSION tar xvf $CWD/$PRGNAM-$VERSION.tar.bz2 cd $PRGNAM-$VERSION 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 {} \; +find -L . -perm /111 -a \! -perm 755 -a -exec chmod 755 {} \+ -o \ + \! -perm /111 -a \! -perm 644 -a -exec chmod 644 {} \+ patch -p1 < $CWD/gcc7.diff @@ -85,15 +80,21 @@ make -j1 datainstall DESTDIR=$PKG # For some reason `make install' creates all the dirs 0777 find $PKG -type d | xargs chmod 0755 -find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \ +find $PKG/usr/lib$LIBDIRSUFFIX/$PRGNAM -type f -print0 \ + | xargs -0 file \ + | grep -e "executable" -e "shared object" | grep ELF \ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true -# Tenemos una pagina de man en español... -mkdir -p $PKG/usr/man/man6 $PKG/usr/man/es/man6 -mv doc/man/$PRGNAM.es.6 $PKG/usr/man/es/man6 -mv doc/man/*.6 $PKG/usr/man/man6 +# Tenemos una pagina de man en español... but I finally got around +# to looking at it, and it's almost content-free. The one piece of +# 'useful information' is "This program doesn't have any option", +# which (a) isn't in Spanish, and (b) is *wrong*. So ditch it. + +mkdir -p $PKG/usr/man/man6 +rm -f doc/man/$PRGNAM.es.6 +cp doc/man/*.6 $PKG/usr/man/man6 rm -rf doc/man -gzip $PKG/usr/man/man6/*.6 $PKG/usr/man/es/man6/*.6 +gzip $PKG/usr/man/man6/*.6 # Docs are a bit of a mess... mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION @@ -110,8 +111,15 @@ cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild mkdir -p $PKG/usr/share/applications cat $CWD/$PRGNAM.desktop > $PKG/usr/share/applications/$PRGNAM.desktop +for px in 16 32 48 64; do + size=${px}x${px} + dir=$PKG/usr/share/icons/hicolor/$size/apps + mkdir -p $dir + convert -resize $size Ticon.png $dir/$PRGNAM.png +done + mkdir -p $PKG/usr/share/pixmaps -( cd $PKG/usr/share/pixmaps ; ln -s ../games/$PRGNAM/Ticon.png $PRGNAM.png ) +ln -s ../icons/hicolor/48x48/apps/$PRGNAM.png $PKG/usr/share/pixmaps/$PRGNAM.png mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc |