aboutsummaryrefslogtreecommitdiff
path: root/academic/tuxmath/tuxmath.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'academic/tuxmath/tuxmath.SlackBuild')
-rw-r--r--academic/tuxmath/tuxmath.SlackBuild22
1 files changed, 12 insertions, 10 deletions
diff --git a/academic/tuxmath/tuxmath.SlackBuild b/academic/tuxmath/tuxmath.SlackBuild
index ccfe72460b2a5..af44073146a44 100644
--- a/academic/tuxmath/tuxmath.SlackBuild
+++ b/academic/tuxmath/tuxmath.SlackBuild
@@ -5,16 +5,14 @@
# Written by Larry Hajali <larryhaja[at]gmail[dot]com>
PRGNAM=tuxmath
-VERSION=${VERSION:-1.7.2}
+VERSION=${VERSION:-1.9.0}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
-# Automatically determine the architecture we're building on:
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
i?86) ARCH=i486 ;;
arm*) ARCH=arm ;;
- # Unless $ARCH is already set, use uname -m for all other archs:
*) ARCH=$( uname -m ) ;;
esac
fi
@@ -48,17 +46,16 @@ find . \
-exec chmod 644 {} \;
# Fix .desktop.
-sed -i '/^##/d' $PRGNAM.desktop
+sed -i -e '/^##/d' -e '/^X/d' -e 's|Math;||' $PRGNAM.desktop
-# Hmmmm...SDL_pango is an optional requirement with SDL_ttf as the fallback.
-# However, I can't get tuxmath to build without SDL_pango even by passing
-# --without-sdlpango option to configure. Oh well!!! :/
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
./configure \
--prefix=/usr \
+ --localstatedir=/var \
--docdir=/usr/doc/$PRGNAM-$VERSION \
--disable-sdltest \
+ --disable-dependency-tracking \
--build=$ARCH-slackware-linux
make
@@ -67,9 +64,14 @@ make install DESTDIR=$PKG
find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
-mkdir -p $PKG/usr/share/{applications,pixmaps}
-install -m 0644 $PRGNAM.desktop $PKG/usr/share/applications
-install -m 0644 data/images/icons/$PRGNAM.svg $PKG/usr/share/pixmaps
+install -D -m 0644 $PRGNAM.desktop $PKG/usr/share/applications/$PRGNAM.desktop
+for i in 16 24 32 48 64 96 128; do
+ convert data/images/icons/$PRGNAM.svg -resize ${i}x${i}! $PRGNAM-$i.png
+ install -D -m 0644 $PRGNAM-$i.png \
+ $PKG/usr/share/icons/hicolor/${i}x${i}/apps/$PRGNAM.png
+done
+install -D -m 0644 data/images/icons/$PRGNAM.svg \
+ $PKG/usr/share/icons/hicolor/scalable/apps/$PRGNAM.svg
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild