diff options
Diffstat (limited to 'network/spice-gtk/spice-gtk.SlackBuild')
-rw-r--r-- | network/spice-gtk/spice-gtk.SlackBuild | 75 |
1 files changed, 40 insertions, 35 deletions
diff --git a/network/spice-gtk/spice-gtk.SlackBuild b/network/spice-gtk/spice-gtk.SlackBuild index 6561b22050..bf2696d61f 100644 --- a/network/spice-gtk/spice-gtk.SlackBuild +++ b/network/spice-gtk/spice-gtk.SlackBuild @@ -1,7 +1,8 @@ -#!/bin/sh +#!/bin/bash # Slackware build script for spice-gtk -# Copyright 2013-2018 Matteo Bernardini <ponce@slackbuilds.org> Pisa, Italy + +# Copyright 2013-2023 Matteo Bernardini <ponce@slackbuilds.org> Pisa, Italy # All rights reserved. # # Redistribution and use of this script, with or without modification, is @@ -21,10 +22,13 @@ # 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) + PRGNAM=spice-gtk -VERSION=${VERSION:-0.35} +VERSION=${VERSION:-0.42} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} +PKGTYPE=${PKGTYPE:-tgz} if [ -z "$ARCH" ]; then case "$( uname -m )" in @@ -34,7 +38,14 @@ if [ -z "$ARCH" ]; then esac fi -CWD=$(pwd) +# 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 "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE" + exit 0 +fi + TMP=${TMP:-/tmp/SBo} PKG=$TMP/package-$PRGNAM OUTPUT=${OUTPUT:-/tmp} @@ -58,7 +69,7 @@ if pkg-config --exists libusbredirhost; then usbredir="en"; else usbredir="dis"; if pkg-config --exists libcacard; then cacard="en"; else cacard="dis"; fi if pkg-config --exists libphodav-2.0; then phodav="en"; else phodav="dis"; fi -DOCS="AUTHORS COPYING NEWS README THANKS TODO" +DOCS="AUTHORS CHANGELOG.md COPYING README.md" set -e @@ -67,7 +78,7 @@ mkdir -p $TMP $PKG $OUTPUT cd $TMP rm -rf $PRGNAM-$VERSION -tar xvf $CWD/$PRGNAM-$VERSION.tar.bz2 +tar xvf $CWD/$PRGNAM-$VERSION.tar.xz cd $PRGNAM-$VERSION chown -R root:root . find -L . \ @@ -76,37 +87,29 @@ find -L . \ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; -# Disable broken tests -sed -i 's/ tests//' Makefile.am Makefile.in - -export VALAC=$(which valac) -export VAPIGEN=$(which vapigen) - -CFLAGS="$SLKCFLAGS" \ -CXXFLAGS="$SLKCFLAGS" \ -./configure \ +# Configure, build, and install: +export CFLAGS="$SLKCFLAGS" +export CXXFLAGS="$SLKCFLAGS" +mkdir meson-build +cd meson-build +meson setup \ --prefix=/usr \ - --libdir=/usr/lib${LIBDIRSUFFIX} \ - --sysconfdir=/etc \ + --libdir=lib${LIBDIRSUFFIX} \ + --libexecdir=/usr/libexec \ + --bindir=/usr/bin \ + --sbindir=/usr/sbin \ + --includedir=/usr/include \ + --datadir=/usr/share \ --mandir=/usr/man \ - --docdir=/usr/doc/$PRGNAM-$VERSION \ + --sysconfdir=/etc \ --localstatedir=/var \ - --disable-static \ - --enable-shared \ - --with-gtk=3.0 \ - --enable-gstaudio=yes \ - --enable-gstvideo=yes \ - --disable-maintainer-mode \ - --enable-vala \ - --disable-celt051 \ - --enable-dbus=yes \ - --${usbredir}able-usbredir \ - --${cacard}able-smartcard \ - --${phodav}able-webdav \ - --build=$ARCH-slackware-linux - -make -make install DESTDIR=$PKG + --buildtype=release \ + -D gtk_doc=enabled \ + -D usb-ids-path=/usr/share/hwdata/usb.ids \ + .. || exit 1 + "${NINJA:=ninja}" || exit 1 + DESTDIR=$PKG $NINJA install || exit 1 +cd .. 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 @@ -120,6 +123,8 @@ cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc +echo "/sbin/setcap CAP_FOWNER=+ep usr/libexec/spice-client-glib-usb-acl-helper" \ + >> $PKG/install/doinst.sh cd $PKG -/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz} +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE |