summaryrefslogtreecommitdiff
path: root/games/smc/smc.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'games/smc/smc.SlackBuild')
-rw-r--r--games/smc/smc.SlackBuild38
1 files changed, 26 insertions, 12 deletions
diff --git a/games/smc/smc.SlackBuild b/games/smc/smc.SlackBuild
index b72a47b791..90f565dcc4 100644
--- a/games/smc/smc.SlackBuild
+++ b/games/smc/smc.SlackBuild
@@ -14,6 +14,11 @@
# because it's an optional dep for CEGUI0.7. This build needs CEGUI0.7
# with FreeImage support compiled in.
+# 20211026 bkw: BUILD=3
+# - new-style icons (extracted from the windows .ico file).
+# - /usr/share/smc => /usr/share/games/smc.
+# - binary in /usr/games.
+
# 20160809 bkw:
# - modified for Slack 14.2, specifically the game's fonts were causing
# issues with fontconfig.
@@ -41,9 +46,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
@@ -76,11 +78,8 @@ rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
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 {} \+
./autogen.sh
@@ -89,6 +88,8 @@ CXXFLAGS="$SLKCFLAGS" \
./configure \
--prefix=/usr \
--libdir=/usr/lib${LIBDIRSUFFIX} \
+ --bindir=/usr/games \
+ --datadir=/usr/share/games \
--build=$ARCH-slackware-linux
CFLAGS="$SLKCFLAGS" CXXFLAGS="$SLKCFLAGS" force_arch="$ARCH" make
@@ -106,17 +107,30 @@ make install-strip DESTDIR=$PKG
# But that'll likely have to wait for the next Slackware release, a
# few years from now.
-rm -f $PKG/usr/share/$PRGNAM/gui/font/*.ttf
+rm -f $PKG/usr/share/games/$PRGNAM/gui/font/*.ttf
ln -s /usr/share/fonts/TTF/LiberationSans-Regular.ttf \
- $PKG/usr/share/$PRGNAM/gui/font/default.ttf
+ $PKG/usr/share/games/$PRGNAM/gui/font/default.ttf
ln -s /usr/share/fonts/TTF/LiberationSans-Bold.ttf \
- $PKG/usr/share/$PRGNAM/gui/font/default_bold.ttf
+ $PKG/usr/share/games/$PRGNAM/gui/font/default_bold.ttf
+# .desktop modified from makefiles/unix/smc.desktop
mkdir -p $PKG/usr/share/applications
cat $CWD/$PRGNAM.desktop > $PKG/usr/share/applications/$PRGNAM.desktop
+# icon extracted from makefiles/MSVC9.0/idr_main.ico with icotool
+for i in $CWD/icons/*.png; do
+ px=$( basename $i | cut -d. -f1 )
+ size=${px}x${px}
+ dir=$PKG/usr/share/icons/hicolor/$size/apps
+ mkdir -p $dir
+ cat $i > $dir/$PRGNAM.png
+done
+
+mkdir -p $PKG/usr/share/pixmaps
+ln -s ../icons/hicolor/48x48/apps/$PRGNAM.png $PKG/usr/share/pixmaps/$PRGNAM.png
+
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
-cp -a docs/* $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a docs/* $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
mkdir -p $PKG/install