diff options
author | Michael Bueker <414N@slacky.it> | 2010-05-11 22:21:36 +0200 |
---|---|---|
committer | David Somero <xgizzmo@slackbuilds.org> | 2010-05-11 22:21:36 +0200 |
commit | ab35680a8162b2060d1f4c3c2584f023995891f1 (patch) | |
tree | bff3b6c002ff4f85b34c4b354428db711408b392 /academic/stellarium/stellarium.SlackBuild | |
parent | 47d26f6fd331b8e4dd049ebba225078f7a200422 (diff) | |
download | slackbuilds-ab35680a8162b2060d1f4c3c2584f023995891f1.tar.gz |
academic/stellarium: Updated for version 0.9.1
Diffstat (limited to 'academic/stellarium/stellarium.SlackBuild')
-rw-r--r-- | academic/stellarium/stellarium.SlackBuild | 61 |
1 files changed, 40 insertions, 21 deletions
diff --git a/academic/stellarium/stellarium.SlackBuild b/academic/stellarium/stellarium.SlackBuild index e355725a45..7259293f26 100644 --- a/academic/stellarium/stellarium.SlackBuild +++ b/academic/stellarium/stellarium.SlackBuild @@ -1,8 +1,9 @@ #!/bin/sh # Slackware build script for stellarium - -# Copyright 2007 Michael Bueker <m.bueker@berlin.de> +# Copyright 2008 Alan Alberghini <414N@slacky.it> +# +# Based on slackbuild by Michael Bueker <m.bueker@berlin.de> # # Redistribution and use of this script, with or without modification, is # permitted provided that the following conditions are met: @@ -24,21 +25,33 @@ set -e PRGNAM=stellarium -VERSION=0.8.2 +VERSION=0.9.1 ARCH=${ARCH:-i486} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} -CWD=`pwd` + +CWD=$(pwd) TMP=${TMP:-/tmp/SBo} PKG=$TMP/package-$PRGNAM OUTPUT=${OUTPUT:-/tmp} +# The path containg qt4. It will be added to PATH. +# CMake needs qt4 qmake. +# You have to specify it only if you do not have qt4 executables already inside PATH and +# cmake fails to find qt4. + +QT4PATH="" + +# CFLAGS adjustment. + if [ "$ARCH" = "i486" ]; then SLKCFLAGS="-O2 -march=i486 -mtune=i686" elif [ "$ARCH" = "i686" ]; then SLKCFLAGS="-O2 -march=i686 -mtune=i686" elif [ "$ARCH" = "athlonxp" ]; then SLKCFLAGS="-O2 -march=i686 -mtune=athlon-xp" +elif [ "$ARCH" = "x86_64" ]; then + SLKCFLAGS="-O2 -fPIC" fi rm -rf $PKG @@ -47,30 +60,36 @@ cd $TMP rm -rf $PRGNAM-$VERSION tar -xzvf $CWD/$PRGNAM-$VERSION.tar.gz +patch -p0 < $CWD/boost1.36.patch + cd $PRGNAM-$VERSION chown -R root:root . chmod -R a-s,u+w,go+r-w . -CFLAGS="$SLKCFLAGS" \ -CXXFLAGS="$SLKCFLAGS" \ -./configure \ - --prefix=/usr \ - --sysconfdir=/etc \ - --localstatedir=/var \ - --mandir=/usr/man - -make -make install-strip DESTDIR=$PKG - -if [ -d $PKG/usr/man ]; then - ( cd $PKG/usr/man - find . -type f -exec gzip -9 {} \; - for i in `find . -type l` ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done - ) +if [ "$QT4PATH" ] +then + CFLAGS="$SLKCFLAGS" \ + CXXFLAGS="$SLKCFLAGS" \ + PATH="$QT4PATH/bin":"$PATH" \ + cmake -DCMAKE_INSTALL_PREFIX=/usr . +else + CFLAGS="$SLKCFLAGS" \ + CXXFLAGS="$SLKCFLAGS" \ + cmake -DCMAKE_INSTALL_PREFIX=/usr . fi +make +make install DESTDIR=$PKG + +# Strip executables + +( cd "$PKG" + find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true + find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null +) + mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION -cp -a ABOUT-NLS AUTHORS COPYING ChangeLog INSTALL NEWS README TODO doc/developer_guide.tex $PKG/usr/doc/$PRGNAM-$VERSION +cp -a AUTHORS COPYING ChangeLog INSTALL README $PKG/usr/doc/$PRGNAM-$VERSION cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild mkdir -p $PKG/install |