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.SlackBuild97
1 files changed, 52 insertions, 45 deletions
diff --git a/network/gnome-bluetooth/gnome-bluetooth.SlackBuild b/network/gnome-bluetooth/gnome-bluetooth.SlackBuild
index 9e9f182aea..d381647dab 100644
--- a/network/gnome-bluetooth/gnome-bluetooth.SlackBuild
+++ b/network/gnome-bluetooth/gnome-bluetooth.SlackBuild
@@ -1,8 +1,9 @@
-#!/bin/sh
+#!/bin/bash
# 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
@@ -22,10 +23,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=gnome-bluetooth
-VERSION=${VERSION:-3.20.1}
-BUILD=${BUILD:-1}
+VERSION=${VERSION:-3.34.5}
+BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
@@ -35,19 +39,23 @@ if [ -z "$ARCH" ]; then
esac
fi
-CWD=$(pwd)
+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}
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"
@@ -56,11 +64,9 @@ fi
set -e
-DOCS="AUTHORS COPYING COPYING.LIB INSTALL NEWS README"
-
rm -rf $PKG
-mkdir -p $WRK $PKG $OUTPUT
-cd $WRK
+mkdir -p $TMP $PKG $OUTPUT
+cd $TMP
rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.xz
cd $PRGNAM-$VERSION
@@ -71,44 +77,45 @@ 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
mkdir -p $PKG/install
@@ -116,4 +123,4 @@ cat $CWD/slack-desc > $PKG/install/slack-desc
cat $CWD/doinst.sh > $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