summaryrefslogtreecommitdiffstats
path: root/academic/stellarium/stellarium.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'academic/stellarium/stellarium.SlackBuild')
-rw-r--r--academic/stellarium/stellarium.SlackBuild20
1 files changed, 11 insertions, 9 deletions
diff --git a/academic/stellarium/stellarium.SlackBuild b/academic/stellarium/stellarium.SlackBuild
index 1238d17911..0fca26d0a4 100644
--- a/academic/stellarium/stellarium.SlackBuild
+++ b/academic/stellarium/stellarium.SlackBuild
@@ -35,19 +35,23 @@ OUTPUT=${OUTPUT:-/tmp}
if [ "$ARCH" = "i486" ]; then
SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+ LIBDIRSUFFIX=""
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"
fi
set -e
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
-cd $TMP
+cd $TMP
rm -rf $PRGNAM-$VERSION
tar -xzvf $CWD/$PRGNAM-$VERSION.tar.gz
cd $PRGNAM-$VERSION
@@ -58,17 +62,15 @@ mkdir build && cd build
cmake -DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \
-DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \
- -DCMAKE_BUILD_TYPE="release" ..
+ -DLIB_SUFFIX="$LIBDIRSUFFIX" \
+ -DCMAKE_BUILD_TYPE="release" \
+ ..
make
make install DESTDIR=$PKG
cd -
-( 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
-)
+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?/*.?
@@ -86,4 +88,4 @@ cat $CWD/slack-desc > $PKG/install/slack-desc
cat $CWD/doinst.sh > $PKG/install/doinst.sh
cd $PKG
-/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.tgz
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}