From 119353649d8ac4a65e6e5f4d859a017802fd87bd Mon Sep 17 00:00:00 2001 From: Eric Hameleers Date: Tue, 16 Jun 2020 22:56:36 +0200 Subject: Deps to rebuild, so let's polish the SlackBuild scripts too --- deps/libdbusmenu-qt5/libdbusmenu-qt5.SlackBuild | 42 ++++++++++++++----------- deps/polkit-qt5-1/polkit-qt5-1.SlackBuild | 12 +++---- deps/qca-qt5/qca-qt5.SlackBuild | 26 ++++++++++----- 3 files changed, 48 insertions(+), 32 deletions(-) diff --git a/deps/libdbusmenu-qt5/libdbusmenu-qt5.SlackBuild b/deps/libdbusmenu-qt5/libdbusmenu-qt5.SlackBuild index 103e251..a16f439 100755 --- a/deps/libdbusmenu-qt5/libdbusmenu-qt5.SlackBuild +++ b/deps/libdbusmenu-qt5/libdbusmenu-qt5.SlackBuild @@ -1,6 +1,6 @@ #!/bin/sh -# Copyright 2010, 2011, 2012, 2014, 2015, 2017 Eric Hameleers, Eindhoven, The Netherlands +# Copyright 2010, 2011, 2012, 2014, 2015, 2017, 2020 Eric Hameleers, Eindhoven, The Netherlands # Copyright 2010, 2011, 2012 Patrick J. Volkerding, Sebeka, MN, USA # All rights reserved. @@ -29,25 +29,37 @@ # Get version number from # grep dbusmenu_qt_VERSION dbusmenu-qt/CMakeLists.txt +cd $(dirname $0) ; CWD=$(pwd) + PKGNAM=libdbusmenu-qt5 SRCNAM=libdbusmenu-qt VERSION=${VERSION:-0.9.3+16.04.20160218} -BUILD=${BUILD:-1} - -NUMJOBS=${NUMJOBS:--j7} +BUILD=${BUILD:-2} # Automatically determine the architecture we're building on: -MARCH=$( uname -m ) if [ -z "$ARCH" ]; then - case "$MARCH" in - i?86) export ARCH=i586 ;; - armv7hl) export ARCH=$MARCH ;; - arm*) export ARCH=arm ;; + case "$(uname -m)" in + i?86) ARCH=i586 ;; + arm*) readelf /usr/bin/file -A | egrep -q "Tag_CPU.*[4,5]" && ARCH=arm || ARCH=armv7hl ;; # Unless $ARCH is already set, use uname -m for all other archs: - *) export ARCH=$MARCH ;; + *) ARCH=$(uname -m) ;; esac + export ARCH +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. +if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then + echo "$PKGNAM-$VERSION-$ARCH-$BUILD.txz" + exit 0 fi +NUMJOBS=${NUMJOBS:-" -j$(expr $(nproc) + 1) "} + +TMP=${TMP:-/tmp} +PKG=$TMP/package-$PKGNAM + if [ "$ARCH" = "i486" ]; then SLKCFLAGS="-O2 -march=i486 -mtune=i686" LIBDIRSUFFIX="" @@ -65,10 +77,6 @@ else LIBDIRSUFFIX="" fi -CWD=$(pwd) -TMP=${TMP:-/tmp} -PKG=$TMP/package-$PKGNAM - rm -rf $PKG mkdir -p $TMP $PKG cd $TMP @@ -79,11 +87,9 @@ cd $SRCNAM-$VERSION || exit 1 chown -R root:root . find . \ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \ - -exec chmod 755 {} \; -o \ + -exec chmod 755 {} \+ -o \ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \ - -exec chmod 644 {} \; - -# Switch the two booleans USE_QT4 and USE_QT5 to build a Qt4 version instead. + -exec chmod 644 {} \+ mkdir -p build cd build diff --git a/deps/polkit-qt5-1/polkit-qt5-1.SlackBuild b/deps/polkit-qt5-1/polkit-qt5-1.SlackBuild index 951071e..e7afa3f 100755 --- a/deps/polkit-qt5-1/polkit-qt5-1.SlackBuild +++ b/deps/polkit-qt5-1/polkit-qt5-1.SlackBuild @@ -20,7 +20,7 @@ # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -# Modified 2014, 2015, 2016, 2017, 2019 by Eric Hameleers +# Modified 2014, 2015, 2016, 2017, 2019, 2020 by Eric Hameleers cd $(dirname $0) ; CWD=$(pwd) @@ -28,7 +28,7 @@ cd $(dirname $0) ; CWD=$(pwd) PKGNAM=polkit-qt5-1 SRCNAM=polkit-qt-1 VERSION=${VERSION:-0.113.0} -BUILD=${BUILD:-1} +BUILD=${BUILD:-2} NUMJOBS=${NUMJOBS:-"-j$(nproc)"} @@ -86,9 +86,9 @@ cd $SRCNAM-$VERSION || exit 1 chown -R root:root . find . \ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \ - -exec chmod 755 {} \; -o \ + -exec chmod 755 {} \+ -o \ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \ - -exec chmod 644 {} \; + -exec chmod 644 {} \+ # Support for Qt4 was removed in 0.113.0: mkdir -p build @@ -101,8 +101,8 @@ cd build -DMAN_INSTALL_DIR=/usr/man \ -DLIB_SUFFIX=${LIBDIRSUFFIX} \ .. - make $NUMJOBS || make || exit 1 - make install DESTDIR=$PKG || exit 1 + make $NUMJOBS || make || exit 1 + make install DESTDIR=$PKG || exit 1 cd - if [ -d $PKG/usr/man ]; then diff --git a/deps/qca-qt5/qca-qt5.SlackBuild b/deps/qca-qt5/qca-qt5.SlackBuild index 00c8cee..8e24ae4 100755 --- a/deps/qca-qt5/qca-qt5.SlackBuild +++ b/deps/qca-qt5/qca-qt5.SlackBuild @@ -21,11 +21,12 @@ # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +cd $(dirname $0) ; CWD=$(pwd) + PKGNAM=qca-qt5 SRCNAM=qca VERSION=${VERSION:-2.3.0} -BUILD=${BUILD:-1} -NUMJOBS=${NUMJOBS:-" -j$(nproc) "} +BUILD=${BUILD:-2} # Automatically determine the architecture we're building on: if [ -z "$ARCH" ]; then @@ -38,6 +39,19 @@ if [ -z "$ARCH" ]; then export ARCH 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. +if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then + echo "$PKGNAM-$VERSION-$ARCH-$BUILD.txz" + exit 0 +fi + +NUMJOBS=${NUMJOBS:-" -j$(expr $(nproc) + 1) "} + +TMP=${TMP:-/tmp} +PKG=$TMP/package-$PKGNAM + if [ "$ARCH" = "i486" ]; then SLKCFLAGS="-O2 -march=i486 -mtune=i686" LIBDIRSUFFIX="" @@ -52,10 +66,6 @@ elif [ "$ARCH" = "x86_64" ]; then LIBDIRSUFFIX="64" fi -CWD=$(pwd) -TMP=${TMP:-/tmp} -PKG=$TMP/package-${PKGNAM} - rm -rf $PKG mkdir -p $TMP $PKG cd $TMP @@ -66,9 +76,9 @@ cd $SRCNAM-$VERSION || exit 1 chown -R root:root . find . \ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \ - -exec chmod 755 {} \; -o \ + -exec chmod 755 {} \+ -o \ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \ - -exec chmod 644 {} \; + -exec chmod 644 {} \+ # Note: Slackware already has the qt4 build of this, # The qt4 support has been removed as of 2.3.0 . -- cgit v1.2.3