diff options
author | Matteo Bernardini <ponce@slackbuilds.org> | 2022-02-05 18:07:07 +0100 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2022-02-06 15:47:06 +0700 |
commit | 4139712fe9c3356de0471c85cd4977a9acb54a33 (patch) | |
tree | 724733a43f3929f30149d31b5dc1521e45c3b8f1 /graphics/screencloud/screencloud.SlackBuild | |
parent | db2f27c40e294f9a4528a10310db9f57c458ef1f (diff) |
graphics/screencloud: Updated for version 1.5.3, build from source.
Signed-off-by: Matteo Bernardini <ponce@slackbuilds.org>
Signed-off-by: Andrew Clemons <andrew.clemons@gmail.com>
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'graphics/screencloud/screencloud.SlackBuild')
-rw-r--r-- | graphics/screencloud/screencloud.SlackBuild | 75 |
1 files changed, 53 insertions, 22 deletions
diff --git a/graphics/screencloud/screencloud.SlackBuild b/graphics/screencloud/screencloud.SlackBuild index 7b4c075674378..10c6acea0d3df 100644 --- a/graphics/screencloud/screencloud.SlackBuild +++ b/graphics/screencloud/screencloud.SlackBuild @@ -25,11 +25,19 @@ cd $(dirname $0) ; CWD=$(pwd) PRGNAM=screencloud -VERSION=${VERSION:-1.1.0} +VERSION=${VERSION:-1.5.3} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} PKGTYPE=${PKGTYPE:-tgz} +if [ -z "$ARCH" ]; then + case "$( uname -m )" in + i?86) ARCH=i586 ;; + arm*) ARCH=arm ;; + *) ARCH=$( uname -m ) ;; + esac +fi + # If the variable PRINT_PACKAGE_NAME is set, then this script will report what # the name of the created package would be, and then exit. This information # could be useful to other scripts. @@ -42,39 +50,62 @@ TMP=${TMP:-/tmp/SBo} PKG=$TMP/package-$PRGNAM OUTPUT=${OUTPUT:-/tmp} -case "$( uname -m )" in - i?86) DEBARCH=i386 ; ARCH=i386 ;; - x86_64) DEBARCH=amd64 ; ARCH=x86_64 ;; - arm*) ARCH=arm ;; - *) echo "$( uname -m ) not supported!" ; exit 1 ;; -esac +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 -eu +set -e rm -rf $PKG mkdir -p $TMP $PKG $OUTPUT -cd $PKG -ar p $CWD/screencloud_${VERSION}_${DEBARCH}.deb data.tar.gz | tar xvz +cd $TMP +rm -rf $PRGNAM-$VERSION +tar xvf $CWD/$PRGNAM-$VERSION.tar.gz +cd $PRGNAM-$VERSION 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 {} \; - -chmod 0755 $PKG -#rm -rf etc/ - -mkdir -p $PKG/usr/doc -mv $PKG/usr/share/doc/$PRGNAM $PKG/usr/doc/$PRGNAM-$VERSION -rmdir $PKG/usr/share/doc + -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; -mkdir -p $PKG/usr/share/icons -mkdir -p $PKG/usr/share/applications +patch -p1 < $CWD/010-screencloud-fix-python-link-libraries.patch + +mkdir -p build +cd build + cmake \ + -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \ + -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \ + -DCMAKE_INSTALL_PREFIX=/usr \ + -DLIB_SUFFIX=${LIBDIRSUFFIX} \ + -DCMAKE_INSTALL_DOCDIR=/usr/doc/$PRGNAM-$VERSION \ + -DPYTHON_USE_PYTHON3=ON \ + -DQUAZIP_INCLUDE_DIR="/usr/include/QuaZip-Qt5-1.1/quazip" \ + -DQUAZIP_LIBRARY="/usr/lib$LIBDIRSUFFIX/libquazip1-qt5.so" \ + -Wno-dev \ + -DCMAKE_BUILD_TYPE=Release .. + make + make install DESTDIR=$PKG +cd .. +rm -f $PKG/usr/bin/*.sh -mkdir -p $PKG/usr/bin -ln -s /opt/screencloud/screencloud.sh $PKG/usr/bin/$PRGNAM +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 +mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION +cp -a LICENSE README.md $PKG/usr/doc/$PRGNAM-$VERSION +cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild + mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc |