Anonymous avatar Anonymous committed b98423d

Update supertuxkart to 0.8.1

Signed-off-by: Lee Pak Hong <benreilly@vector.Linux.net>;

Comments (0)

Files changed (1)

var/vabs/supertuxkart/src/supertuxkart.SlackBuild

 # AUTHORS = 
 
 NAME="supertuxkart"            #Enter package Name!
-VERSION=${VERSION:-"0.7.3"}      #Enter package Version!
+VERSION=${VERSION:-"0.8.1"}      #Enter package Version!
 VER=$(echo $VERSION|sed 's/-/_/') #this fixes - in version
 VL_PACKAGER=${VL_PACKAGER:-"stretchedthin"}   #Enter your Name!
 LINK=${LINK:-"http://downloads.sourceforge.net/$NAME/$NAME-$VERSION-src.tar.bz2"}  #Enter URL for package here!
 if [[ "$ARCH" = i?86 ]]; then
   ARCH=i586
   SLKCFLAGS="-O2 -march=i586 -mtune=i686"
-  CONFIGURE_TRIPLET="i486-vector-linux"
+  CONFIGURE_TRIPLET="i586-vector-linux"
   LIBDIRSUFFIX=""
 elif [ "$ARCH" = "x86_64" ]; then
   SLKCFLAGS="-O2 -fpic"
 # your patches use the -p1 strip option!
 #-----------------------------------------------------
 for i in $CWD/patches/*;do
-  patch -p1 <$i
+#  patch -p1 <$i
   mkdir -p $PKG/usr/doc/$NAME-$VERSION/patches/
   cp $i $PKG/usr/doc/$NAME-$VERSION/patches/
 done
 #-----------------------------------------------------
- sed -i 's|\/games|\/bin|g' data/${NAME}_desktop.template
-for i in $(find . -name "Makefile.*"); do
-  sed -i \
-    -e "/^bindir/s|games|bin|g" \
-    -e "/^pkgdatadir/s|=.*\/po|= \@localedir\@|" \
-    -e 's|\/games\/|\/|g' $i
-done
+
+# The Makefile's don't respect directory variables given to configure.
+# Let's fix that with a few other additional cleanups.
+patch -p1 < $CWD/patches/translations.patch
+sed -i 's|\/games|\/bin|g' data/${NAME}_desktop.template
  
 
 #SET PERMISSIONS
 #-----------------------------------------------------------------------
 
 echo "Configuring source..."
-./configure --prefix=/usr \
-  --libdir=/usr/lib${LIBDIRSUFFIX} \
-  --infodir=/usr/info \
-  --sysconfdir=/etc \
-  --localstatedir=/var \
-  --mandir=/usr/man \
-  --with-included-gettext \
-  --disable-debug \
-  --program-prefix="" \
-  --program-suffix="" \
-  --build=$CONFIGURE_TRIPLET \
-  $CONFIG_OPTIONS || exit 1
-
-make || exit 1
 
-make install DESTDIR=$PKG || exit 1
+# First build the Irrlicht (static) library.
+#  Note: This is a forked, modfied copy of irrlicht-1.8
+#        The original irrlicht library cannot be used, but both
+#        coexist without problems.
+cd lib/irrlicht/source/Irrlicht
+  CFLAGS="$SLKCFLAGS" \
+  CXXFLAGS="$SLKCFLAGS" \
+  NDEBUG=1 \
+  make
+cd -
+
+# Now make SuperTuxKart
+mkdir -p build
+cd build
+  cmake \
+    -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \
+    -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \
+    -DCMAKE_INSTALL_PREFIX=/usr \
+    -DCMAKE_BUILD_TYPE=Release ..
+  make VERBOSE=1
+  make install DESTDIR=$PKG
+cd ..
 
 
 #######################################################################
 #Miscellenious tweaks and things outside a normal ./configure go here #
 #######################################################################
-if test -f $CWD/$NAME.png; then
-mkdir -p $PKG/usr/share/pixmaps
-cp $CWD/$NAME.png $PKG/usr/share/pixmaps/$NAME.png; fi
-## Now test for desktop file
-mkdir -p $PKG/usr/share/applications
-if test -f $CWD/${NAME}.desktop; then
-cp $CWD/$NAME.desktop $PKG/usr/share/applications/$NAME.desktop
-fi
-
 
 
 mkdir -p $PKG/usr/doc/$NAME-$VERSION
-cp -a AUTHORS COPYING ChangeLog Credits MANIFEST README TODO \
+cp -a AUTHORS CHANGES ChangeLog COPYING INSTALL README TODO \
 $PKG/usr/doc/$NAME-$VERSION
 cat $CWD/$NAME.SlackBuild > $PKG/usr/doc/$NAME-$VERSION/$NAME.SlackBuild
 
 EOF
 fi
 
-# Add schemas install to the doinst.sh if schemas are found.
-if [ -d $PKG/etc/gconf/schemas ];then
-# Make sure we have gconftool installed
-echo "if [ -x usr/bin/gconftool-2 ]; then" >> $PKG/install/doinst.sh
-( cd $PKG/etc/gconf/schemas
-for schema in *.schemas; do
- # Install schemas
- echo "GCONF_CONFIG_SOURCE=\"xml::etc/gconf/gconf.xml.defaults\" \
-   usr/bin/gconftool-2 --makefile-install-rule \
-   etc/gconf/schemas/${schema} >/dev/null 2>&1" \
-   >> $PKG/install/doinst.sh
-done;
-)
-# Finish off gconf block
-echo "fi" >> $PKG/install/doinst.sh
+cat >> $PKG/install/doinst.sh << EOF
+# update rarian database
+if [ -x usr/bin/rarian-sk-update ]; then
+  usr/bin/rarian-sk-update 1> /dev/null 2> /dev/null
+fi
+
+# update mime database
+if [ -x usr/bin/update-mime-database ]; then
+  usr/bin/update-mime-database usr/share/mime 1> /dev/null 2> /dev/null
+fi
+
+# update desktop entries
+if [ -x usr/bin/update-desktop-database ]; then
+  usr/bin/update-desktop-database 1> /dev/null 2> /dev/null
 fi
-cat $CWD/doinst.sh >> $PKG/install/doinst.sh
+
+# update hicolor icons
+if [ -e usr/share/icons/hicolor/icon-theme.cache ]; then
+	rm -f usr/share/icons/hicolor/icon-theme.cache
+fi
+usr/bin/gtk-update-icon-cache -f -q usr/share/icons/hicolor 1>/dev/null 2>/dev/null
+
+if [ -x /usr/bin/glib-compile-schemas ]; then
+  /usr/bin/glib-compile-schemas usr/share/glib-2.0/schemas/ >/dev/null 2>&1
+fi
+
+# Restart gconfd-2 if running to reload new gconf settings
+if ps acx | grep -q gconfd-2 ; then
+        killall -HUP gconfd-2 ;
+fi
+
+# A good idea whenever kernel modules are added or changed:
+if [ -x sbin/depmod ]; then
+  /sbin/depmod -a 1> /dev/null 2> /dev/null
+fi
+EOF
 
 
 #if there is a slack-desc in src dir use it
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.