diff options
Diffstat (limited to 'graphics/leocad/leocad.SlackBuild')
-rw-r--r-- | graphics/leocad/leocad.SlackBuild | 37 |
1 files changed, 22 insertions, 15 deletions
diff --git a/graphics/leocad/leocad.SlackBuild b/graphics/leocad/leocad.SlackBuild index 9172a8ab7ec9b..c585f80877bac 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 |