summaryrefslogtreecommitdiff
path: root/graphics/leocad/leocad.SlackBuild
diff options
context:
space:
mode:
authorPhilip van der Hoeven <philip@vd-hoeven.nl>2015-02-05 06:30:10 +0700
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2015-02-05 06:47:46 +0700
commit23b5526429c610ef7642ed3b269eed05a8e39ef8 (patch)
tree9dad78e3106d55c6553cba4c6c68d439b8c7dc29 /graphics/leocad/leocad.SlackBuild
parent99be6c968a0b3215bf4b8acd69e4dd8ee01c9702 (diff)
downloadslackbuilds-23b5526429c610ef7642ed3b269eed05a8e39ef8.tar.gz
graphics/leocad: Updated for version 0.81 + new maintainer.
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'graphics/leocad/leocad.SlackBuild')
-rw-r--r--graphics/leocad/leocad.SlackBuild37
1 files changed, 22 insertions, 15 deletions
diff --git a/graphics/leocad/leocad.SlackBuild b/graphics/leocad/leocad.SlackBuild
index 9172a8ab7e..c585f80877 100644
--- a/graphics/leocad/leocad.SlackBuild
+++ b/graphics/leocad/leocad.SlackBuild
@@ -4,6 +4,7 @@
# 3D design program for bricks
# Copyright 2009-2013 Niels Horn, Rio de Janeiro, Brazil
+# Copyright 2015 Philip van der Hoeven, Almere, The Netherlands
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -23,10 +24,8 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-# revision date 2013/03/24
-
PRGNAM=leocad
-VERSION=${VERSION:-0.79.3}
+VERSION=${VERSION:-0.81}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
@@ -62,7 +61,7 @@ set -e
rm -rf $TMP/$PRGNAM $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
-tar xvf $CWD/$PRGNAM-$VERSION-src.tgz
+tar xvf $CWD/LeoCAD-Source-$VERSION.tgz
cd $PRGNAM
chown -R root:root .
find -L . \
@@ -71,25 +70,33 @@ find -L . \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
-# Include libs gcc-4.7 won't find by itself
-sed "/^LIBS/s/=/= -lX11 -ldl/" -i Makefile
+# This seems to be an error in de qrc file
+sed -i 's/leocad_pt.qm/leocad_pt.ts/' leocad.qrc
+
+qmake DISABLE_UPDATE_CHECK=1 DOCS_DIR=/usr/doc/$PRGNAM-$VERSION MAN_DIR=/usr/man/man1 leocad.pro
+CFLAGS="$SLKCFLAGS" \
+CXXFLAGS="$SLKCFLAGS" \
+make
+make INSTALL_ROOT="$PKG" install
-make config PREFIX=/usr DESTDIR=$PKG
-CFLAGS="$SLKCFLAGS" CPPFLAGS="$SLKCFLAGS" make
-make install
+find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
+ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
-strip --strip-unneeded $PKG/usr/bin/$PRGNAM
+# Fix icon
+mkdir -p $PKG/usr/share/pixmaps
+ln -s $PKG/usr/share/icons/hicolor/scalable/mimetypes/application-vnd.leocad.svg $PKG/usr/share/pixmaps/leocad.svg
+sed -i 's%Icon=leocad.svg%Icon=leocad%' $PKG/usr/share/applications/leocad.desktop
-# Move & Compress man pages
-mv $PKG/usr/share/man $PKG/usr/man
+mkdir -p $PKG/usr/man/man1
+cp -a docs/leocad.1 \
+ $PKG/usr/man/man1
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/doc/$PRGNAM-$VERSION
cp -a \
- CREDITS.txt README.txt docs/COPYING.txt docs/INSTALL.txt \
- docs/LINUX.txt docs/TODO.txt $PKG/usr/doc/$PRGNAM-$VERSION
-find $PKG/usr/doc/$PRGNAM-$VERSION -type f -exec chmod 644 {} \;
+ docs/CREDITS.txt docs/README.txt docs/COPYING.txt \
+ $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
mkdir -p $PKG/install