Browse Source

xap/marble: Upgraded to marble-1.2.0.

slackware-14.2
Damien Goutte-Gattat 11 years ago
parent
commit
52f191d49a
  1. 5
      xap/marble/doinst.sh
  2. 1
      xap/marble/marble-1.2.0-source.tar.gz.sha1
  3. 42
      xap/marble/marble.SlackBuild

5
xap/marble/doinst.sh

@ -0,0 +1,5 @@
#!/bin/sh
if [ -x /usr/bin/update-desktop-database ]; then
/usr/bin/update-desktop-database usr/share/applications >/dev/null 2>&1
fi

1
xap/marble/marble-1.2.0-source.tar.gz.sha1

@ -0,0 +1 @@
a6a0be95082adb6aab69a055bfddfd78e9c39070 marble-1.2.0-source.tar.gz

42
xap/marble/marble.SlackBuild

@ -1,6 +1,6 @@
#!/bin/bash
# Build script for Slackware
# Copyright (C) 2009 Damien Goutte-Gattat
# Copyright (C) 2009,2012 Damien Goutte-Gattat
#
# Redistribution and use of this script, with or without modifications,
# is permitted provided that the following conditions are met:
@ -23,25 +23,24 @@
# Contact: Damien Goutte-Gattat <dgouttegattat@incenp.org>
#
# Latest marble sourcecode is available at: <http://edu.kde.org/marble/>.
#
# Depends: l/qt4
# Source package infos
NAMESRC=${NAMESRC:-marble}
REVISION=${REVISION:-963021}
REPOS=${REPOS:-svn://anonsvn.kde.org/home/kde/branches/KDE/4.2/kdeedu/marble}
ARCHIVE=${ARCHIVE:-$NAMESRC-svn$REVISION.tar.gz}
VERSION=${VERSION:-1.2.0}
ARCHIVE=${ARCHIVE:-$NAMESRC-$VERSION-source.tar.gz}
WGET=${WGET:-http://files.kde.org/marble/downloads/sources/$ARCHIVE}
# Built package infos
NAMETGZ=${NAMETGZ:-marble}
NAMEPKG=${NAMEPKG:-marble}
BUILD=${BUILD:-1GGD}
ARCH=${ARCH:-i486}
ARCH=${ARCH:-$(uname -m | sed 's/^i.86$/i486/;s/^arm.*/arm/')}
JOBS=${JOBS:-1}
EXT=${EXT:-txz}
# Directories
TMP=${TMP:-/tmp}
OUT=${OUT:-$TMP/build}
PKG=${PKG:-$OUT/$NAMETGZ}
PKG=${PKG:-$OUT/$NAMEPKG}
CWD=$(pwd)
set -e
@ -57,12 +56,14 @@ if [ ! -d $TMP ]; then
fi
# Compilation flags
OPT64=""
case "$ARCH" in
i?86)
CPUOPT="-O2 -march=$ARCH -mtune=i686"
;;
x86_64)
CPUOPT="-O2 -fPIC"
OPT64="-DLIB_SUFFIX=64"
;;
*)
CPUOPT="-O2"
@ -70,48 +71,51 @@ x86_64)
esac
# Get and verify the source archive
NAME=marble-svn$REVISION
if [ ! -r $ARCHIVE ]; then
svn co -r $REVISION $REPOS $NAME
tar czf $ARCHIVE $NAME
rm -rf $NAME
wget -c -O $ARCHIVE.part "$WGET"
mv $ARCHIVE.part $ARCHIVE
fi
sha1sum -c $ARCHIVE.sha1
NAME=$NAMESRC-$VERSION
# Compile
cd $TMP
mkdir -p $TMP/$NAME/build
cd $TMP/$NAME
echo "Building $ARCHIVE..."
tar xf $CWD/$ARCHIVE
mkdir $NAME/build && cd $NAME/build
cd build
CFLAGS=$CPUOPT \
CXXFLAGS=$CPUOPT \
cmake \
-DCMAKE_INSTALL_PREFIX=/usr \
-DQTONLY=ON \
$OPT64 \
..
make -j $JOBS
make install DESTDIR=$PKG
cd ..
# Strip binaries
find $PKG | xargs file | grep "ELF 32-bit LSB" | cut -d : -f 1 | \
find $PKG | xargs file | grep "ELF \(32\|64\)-bit LSB" | cut -d : -f 1 | \
xargs strip --strip-unneeded 2> /dev/null
# Install the documentation
mkdir -p $PKG/usr/doc/$NAME
install -m 644 \
BUGS CODING CREDITS ChangeLog LICENSE.txt MANIFESTO.txt TODO USECASES \
BUGS CODING COPYING* CREDITS ChangeLog LICENSE* MANIFESTO.txt TODO USECASES \
$PKG/usr/doc/$NAME
cp -a docs $PKG/usr/doc/$NAME/
# Copy slack-desc file
# Copy slack-desc and doinst.sh files
install -D -m 644 $CWD/slack-desc $PKG/install/slack-desc
install -m 755 $CWD/doinst.sh $PKG/install/doinst.sh
# Package the tree
cd $PKG
mkdir -p $OUT
PACKAGING="
chown root:root . -R
/sbin/makepkg -l y -c n $OUT/$NAMETGZ-svn$REVISION-$ARCH-$BUILD.tgz
/sbin/makepkg -l y -c n $OUT/$NAMEPKG-$VERSION-$ARCH-$BUILD.$EXT
rm -rf $PKG
rm -rf $TMP/$NAME
"

Loading…
Cancel
Save