diff options
Diffstat (limited to 'source/xap/blueman')
-rw-r--r-- | source/xap/blueman/0001-Notification-Also-check-if-notification-daemon-suppo.patch | 44 | ||||
-rw-r--r-- | source/xap/blueman/0002-NetConf-Treat-UnicodeDecodeError-as-if-there-was-no-.patch | 27 | ||||
-rw-r--r-- | source/xap/blueman/blueman-open | 114 | ||||
-rw-r--r-- | source/xap/blueman/blueman-use_blueman-open_for_obexfs.diff | 12 | ||||
-rwxr-xr-x | source/xap/blueman/blueman.SlackBuild | 75 | ||||
-rw-r--r-- | source/xap/blueman/doinst.sh | 6 | ||||
-rw-r--r-- | source/xap/blueman/slack-desc | 2 |
7 files changed, 109 insertions, 171 deletions
diff --git a/source/xap/blueman/0001-Notification-Also-check-if-notification-daemon-suppo.patch b/source/xap/blueman/0001-Notification-Also-check-if-notification-daemon-suppo.patch new file mode 100644 index 00000000..fd244f3f --- /dev/null +++ b/source/xap/blueman/0001-Notification-Also-check-if-notification-daemon-suppo.patch @@ -0,0 +1,44 @@ +From fe902c8827fccae8df93d9deff53e22917d69369 Mon Sep 17 00:00:00 2001 +From: Sander Sweers <infirit@gmail.com> +Date: Mon, 16 May 2016 16:22:14 +0200 +Subject: [PATCH 1/2] Notification: Also check if notification daemon supports + body + +This is the absolute minimum we require from the notification daemon. With +this we fix the when no daemon is available (not running or installed). +See [1] what prompted this change. + +[1] https://github.com/blueman-project/blueman/issues/519#issuecomment-218976647 +--- + blueman/gui/Notification.py | 14 +++++++++++--- + 1 file changed, 11 insertions(+), 3 deletions(-) + +diff --git a/blueman/gui/Notification.py b/blueman/gui/Notification.py +index 41fdd69..6f3d3dc 100644 +--- a/blueman/gui/Notification.py ++++ b/blueman/gui/Notification.py +@@ -161,10 +161,18 @@ class Notification(object): + def actions_supported(): + return "actions" in Notify.get_server_caps() + ++ @staticmethod ++ def body_supported(): ++ return "body" in Notify.get_server_caps() ++ + def __new__(cls, summary, message, timeout=-1, actions=None, actions_cb=None, pixbuf=None, status_icon=None): +- if not Config('org.blueman.general')['notification-daemon'] or (actions and not cls.actions_supported()): +- # Use fallback as user does not want to use a notification daemon or we have to show actions and the +- # notification daemon does not provide them ++ forced_fallback = not Config('org.blueman.general')['notification-daemon'] ++ ++ if forced_fallback or not cls.body_supported() or (actions and not cls.actions_supported()): ++ # Use fallback in the case: ++ # * user does not want to use a notification daemon ++ # * the notification daemon is not available ++ # * we have to show actions and the notification daemon does not provide them + klass = _NotificationDialog + else: + klass = _NotificationBubble +-- +2.8.3 + diff --git a/source/xap/blueman/0002-NetConf-Treat-UnicodeDecodeError-as-if-there-was-no-.patch b/source/xap/blueman/0002-NetConf-Treat-UnicodeDecodeError-as-if-there-was-no-.patch new file mode 100644 index 00000000..17820a10 --- /dev/null +++ b/source/xap/blueman/0002-NetConf-Treat-UnicodeDecodeError-as-if-there-was-no-.patch @@ -0,0 +1,27 @@ +From 2b4c3aecff94c1093de41285bba34b40bc69ddaf Mon Sep 17 00:00:00 2001 +From: Sander Sweers <infirit@gmail.com> +Date: Mon, 2 May 2016 14:49:13 +0200 +Subject: [PATCH 2/2] NetConf: Treat UnicodeDecodeError as if there was no file + +This is unfortunate but most people will not even notice we created a new +state file. +--- + blueman/main/NetConf.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/blueman/main/NetConf.py b/blueman/main/NetConf.py +index d62dc14..4d7efd8 100644 +--- a/blueman/main/NetConf.py ++++ b/blueman/main/NetConf.py +@@ -222,7 +222,7 @@ class NetConf(object): + NetConf.default_inst = obj + f.close() + return obj +- except IOError: ++ except (IOError, UnicodeDecodeError): + n = cls() + try: + n.store() +-- +2.8.3 + diff --git a/source/xap/blueman/blueman-open b/source/xap/blueman/blueman-open deleted file mode 100644 index 0cfa688f..00000000 --- a/source/xap/blueman/blueman-open +++ /dev/null @@ -1,114 +0,0 @@ -#!/bin/sh -# Blueman Mount Script for Slackware -# by Zarren Spry & Robby Workman -# Based on http://kde-apps.org/content/show.php/kde4+bluetooth+files+open?content=108869 - -# Set to 0 if you want more debugging messages -DEBUG=1 - -device_addr="$1" -device_name="$(hcitool name $device_addr)" -own_name="$(basename $0)" -basedir="${basedir:-$HOME/obexfs}" -mountpoint="${basedir}/${device_addr}" -browser=${browser:-"xdg-open"} - -# If we're running in kde, use kdialog -if [ "$KDE_FULL_SESSION" = "true" ]; then - if which kdialog 1>/dev/null 2>/dev/null; then - messagetype="kdialog" - fi -# If not, then see if libnotify is available -# Even if it is, there may not be a notification daemon running, but there's -# no good way to check for this, so oh well... -elif which notify-send 1>/dev/null 2>/dev/null; then - messagetype="libnotify" -# If no libnotify, then use kdialog if it's installed -elif which kdialog 1>/dev/null 2>/dev/null; then - messagetype="kdialog" -# If all else fails, just don't do notifications -else - messagetype="" -fi - -# Mount function -mount_device () -{ - [ ! -z $DEBUG ] && logger -i -t $own_name "Attempting to mount device $device_name to $mountpoint..." - [ ! -z $DEBUG ] && logger -i -t $own_name "Execute: obexfs -b $device_addr $mountpoint" - - mkdir -p $mountpoint - obexfs -b $device_addr $mountpoint 2>&1 - - if [ $? != 0 ]; then - MSG_TXT="Failed to mount $device_name to $mountpoint. $dbg_msg" - FAILZOR=definitely - if [ ! -z $DEBUG ]; then - logger -i -t $own_name "Failed to mount $device_name to $mountpoint." - fi - else - MSG_TXT="Successfully mounted $device_name to $mountpoint" - if [ ! -z $DEBUG ]; then - logger -i -t $own_name "Successfully mounted $device_name to $mountpoint." - fi - fi - - if [ $messagetype == "kdialog" ]; then - kdialog --passivepopup "$MSG_TXT" 2 - elif [ $messagetype == "libnotify" ]; then - notify-send --expire-time=20000 --icon=blueman "$MSG_TXT" - fi - - [ "$FAILZOR" = "definitely" ] && exit 1 - - [ ! -z $DEBUG ] && logger -i -t $own_name "Opening $mountpoint with $browser..." - $browser $mountpoint 2>&1 - -} - -# Unmount function -umount_device () -{ - if grep -qw $mountpoint /proc/mounts 2>/dev/null ; then - [ ! -z $DEBUG ] && logger -i -t $own_name \ - "$mountpoint has something mounted on it already - unmounting it..." - - fusermount -u $mountpoint 1>/dev/null 2>/dev/null - - if [ $? != 0 ]; then - [ ! -z $DEBUG ] && logger -i -t $own_name "Failed to unmount $mountpoint with fusermount..." - umount -f $mountpoint 1>/dev/null 2>/dev/null - if [ $? != 0 ]; then - [ ! -z $DEBUG ] && \ - logger -i -t $own_name \ - "Failed to unmount $mountpoint with umount - try it manually as root and then start over." - FAILZOR=definitely - MSG_TXT="Failed to unmount $mountpoint with fusermount and umount - try it as root first." - else - break - fi - else - [ ! -z $DEBUG ] && logger -i -t $own_name "Successfully unmounted $device_name." - fi - else - [ ! -z $DEBUG ] && logger -i -t $own_name "$mountpoint has nothing mounted on it - continuing..." - fi - - if [ $messagetype == "kdialog" ]; then - kdialog --passivepopup "$MSG_TXT" 3 - elif [ $messagetype == "libnotify" ]; then - notify-send --expire-time=20000 --icon=blueman "$MSG_TXT" - fi - [ "$FAILZOR" = "definitely" ] && exit 1 -} - -MSG_TXT="Attempting to mount $device_name - please wait..." -if [ $messagetype == "kdialog" ]; then - kdialog --passivepopup "$MSG_TXT" 4 -elif [ $messagetype == "libnotify" ]; then - notify-send --expire-time=20000 --icon=blueman "$MSG_TXT" -fi - -umount_device -mount_device - diff --git a/source/xap/blueman/blueman-use_blueman-open_for_obexfs.diff b/source/xap/blueman/blueman-use_blueman-open_for_obexfs.diff deleted file mode 100644 index 542ee6e5..00000000 --- a/source/xap/blueman/blueman-use_blueman-open_for_obexfs.diff +++ /dev/null @@ -1,12 +0,0 @@ -diff -Nur blueman-1.21.orig/blueman/Constants.py.in blueman-1.21/blueman/Constants.py.in ---- blueman-1.21.orig/blueman/Constants.py.in 2009-09-20 05:01:26.000000000 -0500 -+++ blueman-1.21/blueman/Constants.py.in 2009-12-13 16:26:29.643850538 -0600 -@@ -10,7 +10,7 @@ - POLKIT = "@polkit_val@" == "yes" - HAL_ENABLED = "@hal_en@" == "yes" - --DEF_BROWSE_COMMAND = "nautilus --browser obex://[%d]" -+DEF_BROWSE_COMMAND = "/usr/libexec/blueman-open %d" - - import os - import gettext diff --git a/source/xap/blueman/blueman.SlackBuild b/source/xap/blueman/blueman.SlackBuild index 5559f0db..810b8cc2 100755 --- a/source/xap/blueman/blueman.SlackBuild +++ b/source/xap/blueman/blueman.SlackBuild @@ -2,8 +2,8 @@ # Slackware build script for blueman -# Copyright 2009 Robby Workman, Northport, Alabama, USA -# Copyright 2010 Patrick Volkerding, Sebeka, MN, USA +# Copyright 2009,2015 Robby Workman, Tuscaloosa, Alabama, USA +# Copyright 2010,2015 Patrick Volkerding, Sebeka, MN, USA # All rights reserved. # # Redistribution and use of this script, with or without modification, is @@ -25,12 +25,12 @@ PKGNAM=blueman VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)} -BUILD=${BUILD:-3} +BUILD=${BUILD:-1} # Automatically determine the architecture we're building on: if [ -z "$ARCH" ]; then case "$( uname -m )" in - i?86) export ARCH=i486 ;; + i?86) export ARCH=i586 ;; arm*) export ARCH=arm ;; # Unless $ARCH is already set, use uname -m for all other archs: *) export ARCH=$( uname -m ) ;; @@ -43,8 +43,8 @@ CWD=$(pwd) TMP=${TMP:-/tmp} PKG=$TMP/package-$PKGNAM -if [ "$ARCH" = "i486" ]; then - SLKCFLAGS="-O2 -march=i486 -mtune=i686" +if [ "$ARCH" = "i586" ]; then + SLKCFLAGS="-O2 -march=i586 -mtune=i686" LIBDIRSUFFIX="" elif [ "$ARCH" = "i686" ]; then SLKCFLAGS="-O2 -march=i686 -mtune=i686" @@ -62,7 +62,7 @@ mkdir -p $TMP $PKG cd $TMP rm -rf $PKGNAM-$VERSION tar xvf $CWD/$PKGNAM-$VERSION.tar.?z* || exit 1 -cd $PKGNAM-$VERSION +cd $PKGNAM-$VERSION || exit 1 chown -R root:root . find . \ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \ @@ -70,13 +70,12 @@ find . \ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \ -exec chmod 644 {} \; -# Use blueman-open, a modified version of this, to browse obexfs shares: -# http://www.kde-apps.org/content/show.php/kde4+bluetooth+files+open?content=108869 -zcat $CWD/blueman-use_blueman-open_for_obexfs.diff.gz | patch -p1 || exit 1 +zcat $CWD/0001-Notification-Also-check-if-notification-daemon-suppo.patch.gz | patch -p1 --verbose || exit 1 +zcat $CWD/0002-NetConf-Treat-UnicodeDecodeError-as-if-there-was-no-.patch.gz | patch -p1 --verbose || exit 1 CFLAGS="$SLKCFLAGS" \ CXXFLAGS="$SLKCFLAGS" \ -./autogen.sh \ +./configure \ --prefix=/usr \ --libdir=/usr/lib${LIBDIRSUFFIX} \ --sysconfdir=/etc \ @@ -85,43 +84,32 @@ CXXFLAGS="$SLKCFLAGS" \ --docdir=/usr/doc/$PKGNAM-$VERSION \ --disable-static \ --with-dhcp-config=/etc/dhcpd.conf \ - --disable-hal \ --enable-polkit \ - --build=$ARCH-slackware-linux + --enable-thunar-sendto \ + --enable-settings-integration \ + --disable-schemas-compile \ + --build=$ARCH-slackware-linux || exit 1 + +# --with-no-runtime-deps-check + +# I think there's a built-in fallback, but just in case: +sed -i "s,nautilus,thunar,g" blueman/Constants.py* + +# https://github.com/blueman-project/blueman/issues/435 +sed -i "s,#!/usr/bin/env python,#!/usr/bin/python2.7,g" module/_blueman.pyx apps/* make $NUMJOBS || make || exit 1 make install DESTDIR=$PKG || exit 1 -# Add the blueman-open script to /usr/libexec for browsing obexfs shares -# I don't want to put this in PATH and have someone accidentally run it -mkdir -p $PKG/usr/libexec -cat $CWD/blueman-open > $PKG/usr/libexec/blueman-open -chmod 0755 $PKG/usr/libexec/blueman-open - -( cd $PKG - find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | \ - xargs strip --strip-unneeded 2> /dev/null || true - find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | \ - xargs strip --strip-unneeded 2> /dev/null || true -) - -( cd $PKG/usr/man - find . -type f -exec gzip -9 {} \; - for i in $( find . -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done -) - -mkdir -p $PKG/usr/doc/$PKGNAM-$VERSION -cp -a \ - AUTHORS COPYING* INSTALL NEWS README* \ - $PKG/usr/doc/$PKGNAM-$VERSION - -# If there's a ChangeLog, installing at least part of the recent history -# is useful, but don't let it get totally out of control: -if [ -r ChangeLog ]; then - DOCSDIR=$(echo $PKG/usr/doc/${PKGNAM}-$VERSION) - cat ChangeLog | head -n 1000 > $DOCSDIR/ChangeLog - touch -r ChangeLog $DOCSDIR/ChangeLog -fi +# Remove the AppIndicator.py plugin (we don't have libappindicator3 +# nor will we be getting it in the foreseeable future) +rm $PKG/usr/lib${LIBDIRSUFFIX}/python*/site-packages/blueman/plugins/applet/AppIndicator.py* + +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 + +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/install cat $CWD/slack-desc > $PKG/install/slack-desc @@ -129,4 +117,3 @@ zcat $CWD/doinst.sh.gz > $PKG/install/doinst.sh cd $PKG /sbin/makepkg -p -l y -c n $TMP/$PKGNAM-$VERSION-$ARCH-$BUILD.txz - diff --git a/source/xap/blueman/doinst.sh b/source/xap/blueman/doinst.sh index 17b18ef3..80889369 100644 --- a/source/xap/blueman/doinst.sh +++ b/source/xap/blueman/doinst.sh @@ -21,3 +21,9 @@ if [ -e usr/share/icons/hicolor/icon-theme.cache ]; then fi fi +if [ -e usr/share/glib-2.0/schemas ]; then + if [ -x /usr/bin/glib-compile-schemas ]; then + /usr/bin/glib-compile-schemas usr/share/glib-2.0/schemas >/dev/null 2>&1 + fi +fi + diff --git a/source/xap/blueman/slack-desc b/source/xap/blueman/slack-desc index d9b80088..a906f3ff 100644 --- a/source/xap/blueman/slack-desc +++ b/source/xap/blueman/slack-desc @@ -16,4 +16,4 @@ blueman: - Connecting to input and audio devices blueman: - Sending/Receiving/Browsing files via OBEX blueman: - Pairing blueman: -blueman: Homepage: http://blueman-project.org +blueman: Homepage: https://github.com/blueman-project/blueman |