diff options
Diffstat (limited to 'source/l/qca/qca.SlackBuild')
-rwxr-xr-x | source/l/qca/qca.SlackBuild | 42 |
1 files changed, 27 insertions, 15 deletions
diff --git a/source/l/qca/qca.SlackBuild b/source/l/qca/qca.SlackBuild index 49367ffc..2adbe7e9 100755 --- a/source/l/qca/qca.SlackBuild +++ b/source/l/qca/qca.SlackBuild @@ -1,6 +1,6 @@ #!/bin/sh -# Copyright 2006, 2008, 2009 Patrick J. Volkerding, Sebeka, MN, USA +# Copyright 2006, 2008, 2009, 2016 Patrick J. Volkerding, Sebeka, MN, USA # All rights reserved. # # Redistribution and use of this script, with or without modification, is @@ -24,14 +24,14 @@ # No additional license terms and no copyright claim PKGNAM=qca -VERSION=2.0.2 -BUILD=${BUILD:-1} +VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)} +BUILD=${BUILD:-2} NUMJOBS=${NUMJOBS:--j6} # Automatically determine architecture for build & packaging: if [ -z "$ARCH" ]; then case "$( uname -m )" in - i?86) export ARCH=i486 ;; + i?86) export ARCH=i586 ;; # Unless $ARCH is already set, use uname -m for all other archs: *) export ARCH=$( uname -m ) ;; esac @@ -41,8 +41,8 @@ CWD=$(pwd) TMP=${TMP:-/tmp} PKG=$TMP/package-${PKGNAM} -if [ "$ARCH" = "i486" ]; then - SLKCFLAGS="-O2 -march=i486 -mtune=i686" +if [ "$ARCH" = "i586" ]; then + SLKCFLAGS="-O2 -march=i586 -mtune=i686" LIBDIRSUFFIX="" elif [ "$ARCH" = "s390" ]; then SLKCFLAGS="-O2" @@ -56,7 +56,7 @@ rm -rf $PKG mkdir -p $TMP $PKG cd $TMP rm -rf $PKGNAM-$VERSION -tar xvf $CWD/$PKGNAM-$VERSION.tar.bz2 || exit 1 +tar xvf $CWD/$PKGNAM-$VERSION.tar.xz || exit 1 cd $PKGNAM-$VERSION || exit 1 chown -R root:root . find . \ @@ -65,20 +65,32 @@ find . \ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \ -exec chmod 644 {} \; -CFLAGS="$SLKCFLAGS" \ -CXXFLAGS="$SLKCFLAGS" \ -./configure \ - --prefix=/usr \ - --libdir=/usr/lib${LIBDIRSUFFIX} +zcat $CWD/0011-use-_DEFAULT_SOURCE-instead-of-_BSD_SOURCE.patch.gz | patch -p1 --verbose || exit 1 + +mkdir build +cd build + +cmake \ + -DCMAKE_INSTALL_PREFIX=/usr \ + -DQCA_MAN_INSTALL_DIR=/usr/man \ + -DQCA_FEATURE_INSTALL_DIR=/usr/lib${LIBDIRSUFFIX}/qt/mkspecs/features/ \ + -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \ + -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \ + -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_SHARED_LINKER_FLAGS="-lstdc++" \ + -DLIB_SUFFIX="${LIBDIRSUFFIX}" \ + -DQT4_BUILD:BOOL=ON \ + .. || exit 1 make $NUMJOBS || make || exit 1 -make install INSTALL_ROOT=$PKG || exit 1 +make install DESTDIR=$PKG || exit 1 find $PKG | xargs file | grep -e "executable" -e "shared object" \ | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null -mv $PKG/usr/share/man $PKG/usr/ -gzip -9 $PKG/usr/man/man?/*.1 +gzip -9 $PKG/usr/man/man?/*.? + +cd .. mkdir -p $PKG/usr/doc/$PKGNAM-$VERSION cp -a \ |