summaryrefslogtreecommitdiffstats
path: root/network/gnome-bluetooth/gnome-bluetooth.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'network/gnome-bluetooth/gnome-bluetooth.SlackBuild')
-rw-r--r--network/gnome-bluetooth/gnome-bluetooth.SlackBuild83
1 files changed, 39 insertions, 44 deletions
diff --git a/network/gnome-bluetooth/gnome-bluetooth.SlackBuild b/network/gnome-bluetooth/gnome-bluetooth.SlackBuild
index 285d0459d4..d381647dab 100644
--- a/network/gnome-bluetooth/gnome-bluetooth.SlackBuild
+++ b/network/gnome-bluetooth/gnome-bluetooth.SlackBuild
@@ -3,6 +3,7 @@
# Slackware build script for gnome-bluetooth
# Copyright 2016-2018 Chris Farrell <timcowchip@gorge.net>
+# Copyright 2022 Juan M. Lasca <juanmlasca@gmail.com>
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -25,7 +26,7 @@
cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=gnome-bluetooth
-VERSION=${VERSION:-3.20.1}
+VERSION=${VERSION:-3.34.5}
BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
@@ -38,9 +39,6 @@ if [ -z "$ARCH" ]; then
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.
if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
exit 0
@@ -51,13 +49,13 @@ PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
if [ "$ARCH" = "i586" ]; then
- SLKCFLAGS="-O2 -pipe -march=i586 -mtune=i686"
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "i686" ]; then
- SLKCFLAGS="-O2 -pipe -march=i686 -mtune=i686"
+ SLKCFLAGS="-O2 -march=i686 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "x86_64" ]; then
- SLKCFLAGS="-O2 -m64 -pipe -fPIC"
+ SLKCFLAGS="-O2 -fPIC"
LIBDIRSUFFIX="64"
else
SLKCFLAGS="-O2"
@@ -66,8 +64,6 @@ fi
set -e
-DOCS="AUTHORS COPYING COPYING.LIB INSTALL NEWS README"
-
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
@@ -81,48 +77,47 @@ 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 {} \;
-CFLAGS="$SLKCFLAGS" \
-CXXFLAGS="$SLKCFLAGS" \
-./configure \
- --build=$ARCH-slackware-linux \
- --prefix=/usr \
- --exec-prefix=/usr \
- --bindir=/usr/bin \
- --sbindir=/usr/sbin \
- --libdir=/usr/lib${LIBDIRSUFFIX} \
- --includedir=/usr/include \
- --mandir=/usr/man \
- --infodir=/usr/info \
- --sysconfdir=/etc \
- --docdir=/usr/doc/$PRGNAM-$VERSION \
- --disable-static \
- --enable-shared \
- --disable-gtk-doc \
- --disable-schemas-compile \
- --enable-introspection=yes \
- --enable-compile-warnings=no \
- --localstatedir=/var \
- --sharedstatedir=/var/lib \
- --disable-static --enable-shared \
- --disable-gtk-doc \
- --disable-schemas-compile \
- --enable-introspection=yes \
- --enable-compile-warnings=no
-
-make install DESTDIR=$PKG
-
-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
+# Special thanks to Bob Funk, who kindly pointed this problem out and
+# provided a link to the patch fixing it.
+cat $CWD/patches/01-meson.patch | patch -p1 || exit
+
+mkdir build
+cd build
+ CFLAGS="$SLKCFLAGS" \
+ CXXFLAGS="$SLKCFLAGS" \
+ meson .. \
+ --buildtype=release \
+ --infodir=/usr/info \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --localstatedir=/var \
+ --mandir=/usr/man \
+ --prefix=/usr \
+ --sysconfdir=/etc \
+ -Dstrip=true
+ "${NINJA:=ninja}"
+ DESTDIR=$PKG $NINJA install
+cd ..
+
+# handle icon size problem: resize it if Imagemagick is installed,
+# delete them otherwise
+if [ -x /usr/bin/convert ]; then
+ /usr/bin/convert \
+ $PKG/usr/share/icons/hicolor/48x48/status/bluetooth-active.png \
+ -resize 24x24 \
+ $PKG/usr/share/icons/hicolor/24x24/status/bluetooth-active.png
+else
+ rm -fr $PKG/usr/share/icons/hicolor/24x24
+fi
find $PKG/usr/man -type f -exec gzip -9 {} \;
for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
-cp -a $DOCS $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a \
+ AUTHORS COPYING COPYING.LIB MAINTAINERS README.md \
+ $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
-rm -f $PKG/usr/lib*/*.la
-
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
cat $CWD/doinst.sh > $PKG/install/doinst.sh