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>
This commit is contained in:
Matteo Bernardini 2022-02-05 18:07:07 +01:00 committed by Willy Sudiarto Raharjo
parent db2f27c40e
commit 4139712fe9
No known key found for this signature in database
GPG key ID: 3F617144D7238786
3 changed files with 97 additions and 28 deletions

View file

@ -0,0 +1,38 @@
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -263,17 +263,6 @@ set(REQUIRED_LIBS ${REQUIRED_LIBS}
${QUAZIP_LIBRARY}
)
-#Find Python
-if(PYTHON_USE_PYTHON3)
- find_package(PythonLibs 3.3 REQUIRED)
-else(PYTHON_USE_PYTHON3)
- find_package(PythonLibs 2.6 REQUIRED)
-endif(PYTHON_USE_PYTHON3)
-include_directories(${PYTHON_INCLUDE_DIR})
-set(REQUIRED_LIBS ${REQUIRED_LIBS}
- ${PYTHON_LIBRARIES}
-)
-
#Find PythonQt
find_package(PythonQt REQUIRED)
include_directories(${PYTHONQT_INCLUDE_DIR})
@@ -293,6 +282,17 @@ else(PYTHONQT_QTALL_FOUND)
message(STATUS "Using PythonQt_QtBindings (old) for Qt bindings.")
endif(PYTHONQT_QTALL_FOUND)
+#Find Python
+if(PYTHON_USE_PYTHON3)
+ find_package(PythonLibs 3.3 REQUIRED)
+else(PYTHON_USE_PYTHON3)
+ find_package(PythonLibs 2.6 REQUIRED)
+endif(PYTHON_USE_PYTHON3)
+include_directories(${PYTHON_INCLUDE_DIR})
+set(REQUIRED_LIBS ${REQUIRED_LIBS}
+ ${PYTHON_LIBRARIES}
+)
+
#Platform specific libs
if(WIN32)
set(REQUIRED_LIBS ${REQUIRED_LIBS}

View file

@ -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 {} \;
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
chmod 0755 $PKG
#rm -rf etc/
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/doc
mv $PKG/usr/share/doc/$PRGNAM $PKG/usr/doc/$PRGNAM-$VERSION
rmdir $PKG/usr/share/doc
mkdir -p $PKG/usr/share/icons
mkdir -p $PKG/usr/share/applications
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

View file

@ -1,10 +1,10 @@
PRGNAM="screencloud"
VERSION="1.1.0"
VERSION="1.5.3"
HOMEPAGE="https://screencloud.net/"
DOWNLOAD="https://downloads.sourceforge.net/screencloud/screencloud_1.1.0_i386.deb"
MD5SUM="27ace0f4c9532cbdbf32556ff9cc13f1"
DOWNLOAD_x86_64="https://downloads.sourceforge.net/screencloud/screencloud_1.1.0_amd64.deb"
MD5SUM_x86_64="fdabf6873b993f9401e5469e8c53a320"
REQUIRES="qoauth"
DOWNLOAD="https://github.com/olav-st/screencloud/archive/v1.5.3/screencloud-1.5.3.tar.gz"
MD5SUM="09e2ac963e3017609c638e1f1b212e20"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES="PythonQt"
MAINTAINER="Daniel Romero"
EMAIL="infoslack@gmail.com"