diff options
Diffstat (limited to 'graphics/librecad/librecad.SlackBuild')
-rw-r--r-- | graphics/librecad/librecad.SlackBuild | 40 |
1 files changed, 31 insertions, 9 deletions
diff --git a/graphics/librecad/librecad.SlackBuild b/graphics/librecad/librecad.SlackBuild index 0644eac171..86f34f6a96 100644 --- a/graphics/librecad/librecad.SlackBuild +++ b/graphics/librecad/librecad.SlackBuild @@ -4,6 +4,9 @@ # Copyright 2011-2015 Fridrich von Stauffenberg <cancellor2@gmail.com> # All rights reserved. + +# Currently maintained by R S Ananda Murthy <rsamurti@gmail.com> + # # Redistribution and use of this script, with or without modification, is # permitted provided that the following conditions are met: @@ -23,15 +26,15 @@ # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. PRGNAM=librecad -VERSION=${VERSION:-2.1.0} +ORIGNAME=LibreCAD +VERSION=${VERSION:-2.2.0rc1} +SRCVER=${SRCVER:-2.2.0-rc1} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} -ORIG_PRGNAM=LibreCAD - if [ -z "$ARCH" ]; then case "$( uname -m )" in - i?86) ARCH=i486 ;; + i?86) ARCH=i586 ;; arm*) ARCH=arm ;; *) ARCH=$( uname -m ) ;; esac @@ -42,17 +45,36 @@ TMP=${TMP:-/tmp/SBo} PKG=$TMP/package-$PRGNAM OUTPUT=${OUTPUT:-/tmp} +if [ "$ARCH" = "i586" ]; then + SLKCFLAGS="-O2 -march=i586 -mtune=i686" + LIBDIRSUFFIX="" +elif [ "$ARCH" = "i686" ]; then + SLKCFLAGS="-O2 -march=i686 -mtune=i686" + LIBDIRSUFFIX="" +elif [ "$ARCH" = "x86_64" ]; then + SLKCFLAGS="-O2 -fPIC" + LIBDIRSUFFIX="64" +else + SLKCFLAGS="-O2" + LIBDIRSUFFIX="" +fi + set -e rm -rf $PKG mkdir -p $TMP $PKG $OUTPUT cd $TMP -rm -rf $ORIG_PRGNAM-$VERSION -tar xvf $CWD/$ORIG_PRGNAM-$VERSION.tar.gz -cd $ORIG_PRGNAM-$VERSION +rm -rf $ORIGNAME-$SRCVER +tar xvf $CWD/$ORIGNAME-$SRCVER.tar.gz +cd $ORIGNAME-$SRCVER chown -R root:root . +find -L . \ + \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \ + -o -perm 511 \) -exec chmod 755 {} \; -o \ + \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ + -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; -qmake-qt5 $PRGNAM.pro +qmake-qt5 $PRGNAM.pro QMAKE_CFLAGS+="$SLKCFLAGS" QMAKE_CXXFLAGS+="$SLKCFLAGS" make mkdir -p $PKG/opt/$PRGNAM @@ -72,7 +94,7 @@ find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | gr | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION -cp -a *.txt README* LICENSE* $PKG/usr/doc/$PRGNAM-$VERSION +cp -a README* LICENSE* $PKG/usr/doc/$PRGNAM-$VERSION cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild mkdir -p $PKG/install |