summaryrefslogtreecommitdiff
path: root/academic/stellarium/stellarium.SlackBuild
diff options
context:
space:
mode:
authordsomero <xgizzmo@gmail.com>2010-05-23 21:32:13 -0400
committerDavid Somero <xgizzmo@slackbuilds.org>2010-05-23 23:30:58 -0500
commit2a2a59a710fec0285f0fef5b494a6484e97039fe (patch)
tree5ec9a63f36fb4e8474fc49fa41a947e8287866ca /academic/stellarium/stellarium.SlackBuild
parent7321fbe203bff44d3a24706e25c3269f6a2c857c (diff)
downloadslackbuilds-2a2a59a710fec0285f0fef5b494a6484e97039fe.tar.gz
academic/stellarium: Updated for version 10.4.
Diffstat (limited to 'academic/stellarium/stellarium.SlackBuild')
-rw-r--r--academic/stellarium/stellarium.SlackBuild28
1 files changed, 19 insertions, 9 deletions
diff --git a/academic/stellarium/stellarium.SlackBuild b/academic/stellarium/stellarium.SlackBuild
index 0fca26d0a4..0b98950b81 100644
--- a/academic/stellarium/stellarium.SlackBuild
+++ b/academic/stellarium/stellarium.SlackBuild
@@ -23,11 +23,20 @@
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
PRGNAM=stellarium
-VERSION=0.10.2
-ARCH=${ARCH:-i486}
+VERSION=0.10.4
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) export ARCH=i486 ;;
+ arm*) export ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$( uname -m ) ;;
+ esac
+fi
+
CWD=$(pwd)
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
@@ -39,12 +48,12 @@ if [ "$ARCH" = "i486" ]; then
elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
LIBDIRSUFFIX=""
-elif [ "$ARCH" = "athlonxp" ]; then
- SLKCFLAGS="-O2 -march=i686 -mtune=athlon-xp"
- LIBDIRSUFFIX=""
elif [ "$ARCH" = "x86_64" ]; then
SLKCFLAGS="-O2 -fPIC"
LIBDIRSUFFIX="64"
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
fi
set -e
@@ -60,10 +69,10 @@ chmod -R a-s,u+w,go+r-w .
mkdir build && cd build
cmake -DCMAKE_INSTALL_PREFIX=/usr \
- -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \
- -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \
+ -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \
+ -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \
-DLIB_SUFFIX="$LIBDIRSUFFIX" \
- -DCMAKE_BUILD_TYPE="release" \
+ -DCMAKE_BUILD_TYPE="release" \
..
make
make install DESTDIR=$PKG
@@ -73,7 +82,8 @@ find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
mv $PKG/usr/share/man $PKG/usr
-gzip -9 $PKG/usr/man/man?/*.?
+find $PKG/usr/man -type f -exec gzip -9 {} \;
+for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
mkdir -p $PKG/usr/share/{applications,pixmaps}
cat $CWD/$PRGNAM.desktop > $PKG/usr/share/applications/$PRGNAM.desktop