diff options
author | B. Watson <yalhcru@gmail.com> | 2021-11-02 01:38:53 -0400 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2021-12-04 10:08:53 +0700 |
commit | 46bde490fbf77c170d86cbeb43614c653bdf8c28 (patch) | |
tree | 6cb536639dcd66c4cabbc7cfdc9fef0851900a6a /games/torcs | |
parent | 18b0d863ce972f60fa55583c8a0369ee87ad7d20 (diff) |
games/torcs: New-style icons.
Signed-off-by: B. Watson <yalhcru@gmail.com>
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'games/torcs')
-rw-r--r-- | games/torcs/README | 2 | ||||
-rw-r--r-- | games/torcs/doinst.sh | 5 | ||||
-rw-r--r-- | games/torcs/torcs.SlackBuild | 40 | ||||
-rw-r--r-- | games/torcs/torcs.desktop | 2 | ||||
-rw-r--r-- | games/torcs/torcs.info | 2 |
5 files changed, 33 insertions, 18 deletions
diff --git a/games/torcs/README b/games/torcs/README index 63e438c75d00..458e3069a694 100644 --- a/games/torcs/README +++ b/games/torcs/README @@ -1,3 +1,5 @@ +torcs (highly portable multi platform car racing simulation) + TORCS, The Open Racing Car Simulator is a highly portable multi platform car racing simulation. It is used as ordinary car racing game, as AI racing game and as research platform. It runs on Linux (x86, AMD64 and diff --git a/games/torcs/doinst.sh b/games/torcs/doinst.sh index 392c12adb9bd..5934a15ab1ef 100644 --- a/games/torcs/doinst.sh +++ b/games/torcs/doinst.sh @@ -2,3 +2,8 @@ if [ -x /usr/bin/update-desktop-database ]; then /usr/bin/update-desktop-database -q usr/share/applications fi +if [ -e usr/share/icons/hicolor/icon-theme.cache ]; then + if [ -x /usr/bin/gtk-update-icon-cache ]; then + /usr/bin/gtk-update-icon-cache usr/share/icons/hicolor >/dev/null 2>&1 + fi +fi diff --git a/games/torcs/torcs.SlackBuild b/games/torcs/torcs.SlackBuild index 5907061aa989..ceab8bc0e6a7 100644 --- a/games/torcs/torcs.SlackBuild +++ b/games/torcs/torcs.SlackBuild @@ -6,13 +6,14 @@ # 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 diff --git a/games/torcs/torcs.desktop b/games/torcs/torcs.desktop index 67ca9e271323..ad5e43dfede4 100644 --- a/games/torcs/torcs.desktop +++ b/games/torcs/torcs.desktop @@ -1,6 +1,6 @@ [Desktop Entry] Name=TORCS -Exec=torcs +Exec=/usr/games/torcs Type=Application Icon=torcs GenericName=The Open Racing Car Simulator diff --git a/games/torcs/torcs.info b/games/torcs/torcs.info index 715e385c14fb..cb84813f326a 100644 --- a/games/torcs/torcs.info +++ b/games/torcs/torcs.info @@ -1,7 +1,7 @@ PRGNAM="torcs" VERSION="1.3.7" HOMEPAGE="http://torcs.sourceforge.net/" -DOWNLOAD="http://downloads.sourceforge.net/project/torcs/all-in-one/1.3.7/torcs-1.3.7.tar.bz2" +DOWNLOAD="https://downloads.sourceforge.net/project/torcs/all-in-one/1.3.7/torcs-1.3.7.tar.bz2" MD5SUM="de314c3e421e8d7d4323d819c5010d23" DOWNLOAD_x86_64="" MD5SUM_x86_64="" |