Initial commit
This commit is contained in:
59
bluez/bluez-5.51-obexd_without_systemd-1.patch
Normal file
59
bluez/bluez-5.51-obexd_without_systemd-1.patch
Normal file
@@ -0,0 +1,59 @@
|
||||
Submitted By: Armin K. <krejzi at email dot com>
|
||||
Date: 2013-04-29
|
||||
Initial Package Version: 5.17
|
||||
Upstream Status: unknown
|
||||
Origin: Arch Linux (Giovanni Campagna)
|
||||
Description: Allow using obexd without systemd in the user session
|
||||
|
||||
Not all sessions run systemd --user (actually, the majority
|
||||
doesn't), so the dbus daemon must be able to spawn obexd
|
||||
directly, and to do so it needs the full path of the daemon.
|
||||
---
|
||||
Makefile.obexd | 4 ++--
|
||||
obexd/src/org.bluez.obex.service | 4 ----
|
||||
obexd/src/org.bluez.obex.service.in | 4 ++++
|
||||
3 files changed, 6 insertions(+), 6 deletions(-)
|
||||
delete mode 100644 obexd/src/org.bluez.obex.service
|
||||
create mode 100644 obexd/src/org.bluez.obex.service.in
|
||||
|
||||
--- ./Makefile.obexd.orig 2019-09-19 13:51:02.000000000 -0500
|
||||
+++ ./Makefile.obexd 2019-09-20 14:10:10.647348607 -0500
|
||||
@@ -1,12 +1,12 @@
|
||||
if SYSTEMD
|
||||
systemduserunitdir = $(SYSTEMD_USERUNITDIR)
|
||||
systemduserunit_DATA = obexd/src/obex.service
|
||||
+endif
|
||||
|
||||
dbussessionbusdir = $(DBUS_SESSIONBUSDIR)
|
||||
dbussessionbus_DATA = obexd/src/org.bluez.obex.service
|
||||
-endif
|
||||
|
||||
-EXTRA_DIST += obexd/src/obex.service.in obexd/src/org.bluez.obex.service
|
||||
+EXTRA_DIST += obexd/src/obex.service.in obexd/src/org.bluez.obex.service.in
|
||||
|
||||
if OBEX
|
||||
|
||||
diff --git a/obexd/src/org.bluez.obex.service b/obexd/src/org.bluez.obex.service
|
||||
deleted file mode 100644
|
||||
index a538088..0000000
|
||||
--- a/obexd/src/org.bluez.obex.service
|
||||
+++ /dev/null
|
||||
@@ -1,4 +0,0 @@
|
||||
-[D-BUS Service]
|
||||
-Name=org.bluez.obex
|
||||
-Exec=/bin/false
|
||||
-SystemdService=dbus-org.bluez.obex.service
|
||||
diff --git a/obexd/src/org.bluez.obex.service.in b/obexd/src/org.bluez.obex.service.in
|
||||
new file mode 100644
|
||||
index 0000000..9c815f2
|
||||
--- /dev/null
|
||||
+++ b/obexd/src/org.bluez.obex.service.in
|
||||
@@ -0,0 +1,4 @@
|
||||
+[D-BUS Service]
|
||||
+Name=org.bluez.obex
|
||||
+Exec=@libexecdir@/bluetooth/obexd
|
||||
+SystemdService=dbus-org.bluez.obex.service
|
||||
--
|
||||
1.8.3.1
|
||||
|
||||
|
||||
16
bluez/bluez-5.70.tar.sign
Normal file
16
bluez/bluez-5.70.tar.sign
Normal file
@@ -0,0 +1,16 @@
|
||||
-----BEGIN PGP SIGNATURE-----
|
||||
|
||||
iQIcBAABAgAGBQJlFelRAAoJEAbKn10dzyZZkbsP/1H4rf9IiO6QtMfkvj83o+7e
|
||||
UKGnyRTB3x5ZebDVyK2cc9ODE3jtjpmu+1goWMnI2s+7jd9GAM1hDZIUQcupQGoi
|
||||
hqcFkGHU5cqV9H40BLPYXAk3GJY3r9DRcGqlB6XrDl2BRPsIXb97q00MA43Wauob
|
||||
kLMqu1nt2lk92aeFZV1bh8n+evqxJyNMCvUPHcoNb1jIhfA7vXkW1VWagdyGhYMC
|
||||
y0rVs6S1xcuPV+mBOS2jGtDMtlV8HZ2+TdJ8gTG7Vx08nTTyGnvFgS3fzhsZKFJI
|
||||
znuUwpvmTeQednDlGkQ5gi5nwdadoKSX7jHxXXd9PyuXaG5WAWJj7SKnBZVbGolG
|
||||
5JCt6Dlo1Yb9nVbUAAITw9VCjDYibV8K/q06MvAcsusGnWCjiZXhM7RMdOdOx2qt
|
||||
oRECq5mm5fqnRDwgsf1JDnnJ2sBmKwp7frVds1ehFxHOmOU658RDe894h4Jz8eyi
|
||||
yOyEgcDhwdNAxr4znhNWikTizM31dqLYSPQQczQ3qzRuA/hovz7qRf2ur8zThRWd
|
||||
7ddX5xpxRtCH0N5ta4xwxJqxgBBK7l5MAf8ATnKflmH5M8Gr+kJnbzqXGDq9VXtg
|
||||
MGA7GW5H/h2Bvx5kwk7E4KhewAzufgnUt+akAFvcCei/+bTn1Nb0RW+bLQQH//yi
|
||||
7CeNF34X0md65QuMXBWE
|
||||
=dWCv
|
||||
-----END PGP SIGNATURE-----
|
||||
199
bluez/bluez.SlackBuild
Executable file
199
bluez/bluez.SlackBuild
Executable file
@@ -0,0 +1,199 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Copyright 2009, 2010, 2011, 2012, 2013, 2016, 2018 Patrick J. Volkerding, Sebeka, Minnesota, USA
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use of this script, with or without modification, is
|
||||
# permitted provided that the following conditions are met:
|
||||
#
|
||||
# 1. Redistributions of this script must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||
# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
|
||||
# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
|
||||
# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
||||
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
|
||||
# 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=bluez
|
||||
VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
|
||||
BUILD=${BUILD:-1}
|
||||
|
||||
NUMJOBS=${NUMJOBS:-" -j$(expr $(nproc) + 1) "}
|
||||
|
||||
# Automatically determine the architecture we're building on:
|
||||
if [ -z "$ARCH" ]; then
|
||||
case "$( uname -m )" in
|
||||
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 ) ;;
|
||||
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 "$PKGNAM-$VERSION-$ARCH-$BUILD.txz"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if [ "$ARCH" = "i586" ]; then
|
||||
SLKCFLAGS="-O2 -march=i586 -mtune=i686"
|
||||
LIBDIRSUFFIX=""
|
||||
elif [ "$ARCH" = "s390" ]; then
|
||||
SLKCFLAGS="-O2"
|
||||
LIBDIRSUFFIX=""
|
||||
elif [ "$ARCH" = "x86_64" ]; then
|
||||
SLKCFLAGS="-O2 -fPIC"
|
||||
LIBDIRSUFFIX="64"
|
||||
else
|
||||
SLKCFLAGS="-O2"
|
||||
LIBDIRSUFFIX=""
|
||||
fi
|
||||
|
||||
TMP=${TMP:-/tmp}
|
||||
PKG=$TMP/package-$PKGNAM
|
||||
|
||||
rm -rf $PKG
|
||||
mkdir -p $TMP $PKG
|
||||
cd $TMP
|
||||
rm -rf $PKGNAM-$VERSION
|
||||
tar xvf $CWD/${PKGNAM}-${VERSION}.tar.?z || exit 1
|
||||
cd $PKGNAM-$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 \
|
||||
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
|
||||
-exec chmod 644 {} \+
|
||||
|
||||
cat $CWD/bluez-5.51-obexd_without_systemd-1.patch.gz | patch -p1 --verbose || exit 1
|
||||
|
||||
sed -i -e 's|-lreadline|\0 -lncursesw|g' Makefile.{in,tools}
|
||||
|
||||
autoreconf -vif
|
||||
|
||||
# We're adding --enable-deprecated due to this commit:
|
||||
#
|
||||
# commit b1eb2c4cd057624312e0412f6c4be000f7fc3617
|
||||
#Author: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
|
||||
#Date: Wed Jan 4 14:23:58 2017 +0200
|
||||
#
|
||||
# build: Hide deprecated tools under --enable-deprecated
|
||||
#
|
||||
# This marks the following tools as deprecated as they are not longer
|
||||
# maintained or have been replaced by other tools:
|
||||
#
|
||||
# hciattach hciconfig hcitool hcidump rfcomm sdptool ciptool gatttool
|
||||
|
||||
CFLAGS="$SLKCFLAGS" \
|
||||
CXXFLAGS="$SLKCFLAGS" \
|
||||
LDFLAGS="-L/usr/lib$LIBDIRSUFFIX" \
|
||||
./configure \
|
||||
--prefix=/usr \
|
||||
--libdir=/usr/lib${LIBDIRSUFFIX} \
|
||||
--sysconfdir=/etc \
|
||||
--mandir=/usr/man \
|
||||
--localstatedir=/var \
|
||||
--docdir=/usr/doc/${PKGNAM}-${VERSION} \
|
||||
--enable-library \
|
||||
--disable-systemd \
|
||||
--enable-deprecated \
|
||||
--build=$ARCH-slackware-linux || exit 1
|
||||
|
||||
make $NUMJOBS || make || exit 1
|
||||
make install DESTDIR=$PKG || exit 1
|
||||
|
||||
# Don't ship .la files:
|
||||
rm -f $PKG/{,usr/}lib${LIBDIRSUFFIX}/*.la
|
||||
|
||||
# Use reset=1 for the btusb module, which supposedly fixes reconnect problems:
|
||||
mkdir -p $PKG/lib/modprobe.d
|
||||
cp -a $CWD/btusb.conf $PKG/lib/modprobe.d
|
||||
chown root:root $PKG/lib/modprobe.d/btusb.conf
|
||||
chmod 644 $PKG/lib/modprobe.d/btusb.conf
|
||||
|
||||
# Add bluetoothd to /usr/sbin
|
||||
mkdir -p $PKG/usr/sbin
|
||||
ln -s ../libexec/bluetooth/bluetoothd $PKG/usr/sbin
|
||||
|
||||
# Move the dbus config file to the system directory
|
||||
mkdir -p $PKG/usr/share/dbus-1/system.d/
|
||||
mv $PKG/etc/dbus-1/system.d/* $PKG/usr/share/dbus-1/system.d/
|
||||
rmdir --parents $PKG/etc/dbus-1/system.d/
|
||||
|
||||
# Fix substitution in /usr/share/dbus-1/services/org.bluez.obex.service:
|
||||
if [ -x $PKG/usr/libexec/bluetooth/obexd ]; then
|
||||
sed -i "s|@libexecdir@|/usr/libexec|g" $PKG/usr/share/dbus-1/services/org.bluez.obex.service
|
||||
fi
|
||||
|
||||
# Install the configuration files
|
||||
mkdir -p $PKG/etc/bluetooth $PKG/etc/default
|
||||
cat src/main.conf > $PKG/etc/bluetooth/main.conf.new
|
||||
cat profiles/input/input.conf > $PKG/etc/bluetooth/input.conf.new
|
||||
cat profiles/network/network.conf > $PKG/etc/bluetooth/network.conf.new
|
||||
cat $CWD/config/uart.conf > $PKG/etc/bluetooth/uart.conf.new
|
||||
cat $CWD/config/defaultconfig > $PKG/etc/default/bluetooth.new
|
||||
|
||||
# Add an init script
|
||||
mkdir -p $PKG/etc/rc.d
|
||||
cat $CWD/config/rc.bluetooth > $PKG/etc/rc.d/rc.bluetooth.new
|
||||
|
||||
# Let's go ahead and let that start by default, unless an existing init
|
||||
# script is not executable:
|
||||
chmod 755 $PKG/etc/rc.d/rc.bluetooth.new
|
||||
|
||||
# If the deprecated utility gatttool was built, go ahead and install it:
|
||||
if [ -x attrib/gatttool ]; then
|
||||
cp attrib/gatttool $PKG/usr/bin
|
||||
chown root:root $PKG/usr/bin/gatttool
|
||||
chmod 755 $PKG/usr/bin/gatttool
|
||||
fi
|
||||
|
||||
# Compress and if needed symlink the man pages:
|
||||
if [ -d $PKG/usr/man ]; then
|
||||
( cd $PKG/usr/man
|
||||
for manpagedir in $(find . -type d -name "man*") ; do
|
||||
( cd $manpagedir
|
||||
for eachpage in $( find . -type l -maxdepth 1) ; do
|
||||
ln -s $( readlink $eachpage ).gz $eachpage.gz
|
||||
rm $eachpage
|
||||
done
|
||||
gzip -9 *.?
|
||||
)
|
||||
done
|
||||
)
|
||||
fi
|
||||
|
||||
find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
|
||||
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
|
||||
|
||||
mkdir -p $PKG/usr/doc/$PKGNAM-$VERSION
|
||||
cp -a \
|
||||
AUTHORS COPYING* INSTALL README* TODO \
|
||||
$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
|
||||
|
||||
mkdir -p $PKG/install
|
||||
|
||||
cat $CWD/doinst.sh.gz > $PKG/install/doinst.sh
|
||||
cat $CWD/slack-desc > $PKG/install/slack-desc
|
||||
|
||||
cd $PKG
|
||||
/sbin/makepkg -l y -c n $TMP/$PKGNAM-$VERSION-$ARCH-$BUILD.txz
|
||||
1
bluez/bluez.url
Normal file
1
bluez/bluez.url
Normal file
@@ -0,0 +1 @@
|
||||
http://www.kernel.org/pub/linux/bluetooth
|
||||
3
bluez/btusb.conf
Normal file
3
bluez/btusb.conf
Normal file
@@ -0,0 +1,3 @@
|
||||
# use "reset=1" as default, since it should be safe for recent devices and
|
||||
# solves all kind of problems.
|
||||
options btusb reset=1
|
||||
9
bluez/config/defaultconfig
Normal file
9
bluez/config/defaultconfig
Normal file
@@ -0,0 +1,9 @@
|
||||
# /etc/default/bluetooth
|
||||
|
||||
# A space delimited list of devices to start at boot time:
|
||||
ACTIVE_HCI_DEVICES_ON_BOOT="hci0"
|
||||
|
||||
# A semicolon delimited list of SDP (Service Discovery Protocol)
|
||||
# operations for bluetooth devices. See the sdptool for more details.
|
||||
SDPTOOL_OPTIONS=""
|
||||
|
||||
74
bluez/config/rc.bluetooth
Normal file
74
bluez/config/rc.bluetooth
Normal file
@@ -0,0 +1,74 @@
|
||||
#!/bin/bash
|
||||
|
||||
# /etc/rc.d/rc.bluetooth (based on BLFS script)
|
||||
|
||||
# Populated from /etc/default/bluetooth:
|
||||
# ACTIVE_HCI_DEVICES_ON_BOOT and SDPTOOL_OPTIONS
|
||||
|
||||
[ -r /etc/default/bluetooth ] && . /etc/default/bluetooth
|
||||
|
||||
start_hci_dev() {
|
||||
for dev in ${ACTIVE_HCI_DEVICES_ON_BOOT} ; do
|
||||
hciconfig $dev up > /dev/null 2>&1
|
||||
done
|
||||
}
|
||||
|
||||
run_sdptool() {
|
||||
# Declaring IFS local in this function, removes the need to save/restore it
|
||||
local IFS option
|
||||
test -x /usr/bin/sdptool || return 1
|
||||
IFS=";"
|
||||
for option in ${SDPTOOL_OPTIONS}; do
|
||||
IFS=" "
|
||||
/usr/bin/sdptool $option > /dev/null 2>&1
|
||||
done
|
||||
}
|
||||
|
||||
start_uarts() {
|
||||
[ -r /etc/bluetooth/uart.conf ] || return
|
||||
grep -v '^[[:space:]]*(#|$)' /etc/bluetooth/uart.conf | grep -v "^#" | sed -r '/^\s*$/d' | while read i; do
|
||||
/usr/bin/hciattach $i > /dev/null 2>&1
|
||||
done
|
||||
}
|
||||
|
||||
stop_uarts() {
|
||||
killall /usr/bin/hciattach > /dev/null 2>&1
|
||||
}
|
||||
|
||||
start() {
|
||||
if [ -d /sys/class/bluetooth ]; then
|
||||
# Start as background process and assume OK
|
||||
echo -n "Starting Bluetooth services: bluetoothd "
|
||||
/usr/sbin/bluetoothd &
|
||||
echo -n "hciconfig "
|
||||
start_hci_dev
|
||||
echo -n "sdptool "
|
||||
run_sdptool
|
||||
echo "hciattach"
|
||||
start_uarts
|
||||
fi
|
||||
}
|
||||
|
||||
stop() {
|
||||
stop_uarts
|
||||
killall /usr/sbin/bluetoothd > /dev/null 2>&1
|
||||
}
|
||||
|
||||
case "${1}" in
|
||||
start)
|
||||
start
|
||||
;;
|
||||
stop)
|
||||
stop
|
||||
;;
|
||||
restart)
|
||||
stop
|
||||
sleep 1
|
||||
start
|
||||
;;
|
||||
*)
|
||||
echo "Usage: ${0} {start|stop|restart}"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
6
bluez/config/uart.conf
Normal file
6
bluez/config/uart.conf
Normal file
@@ -0,0 +1,6 @@
|
||||
# /etc/bluetooth/uart.conf
|
||||
|
||||
# Attach serial devices via UART HCI to BlueZ stack
|
||||
# Use one line per device
|
||||
# See the hciattach man page for options
|
||||
|
||||
26
bluez/doinst.sh
Normal file
26
bluez/doinst.sh
Normal file
@@ -0,0 +1,26 @@
|
||||
config() {
|
||||
NEW="$1"
|
||||
OLD="$(dirname $NEW)/$(basename $NEW .new)"
|
||||
# If there's no config file by that name, mv it over:
|
||||
if [ ! -r $OLD ]; then
|
||||
mv $NEW $OLD
|
||||
elif [ "$(cat $OLD | md5sum)" = "$(cat $NEW | md5sum)" ]; then # toss the redundant copy
|
||||
rm $NEW
|
||||
fi
|
||||
# Otherwise, we leave the .new copy for the admin to consider...
|
||||
}
|
||||
|
||||
# Keep same perms on rc.bluetooth.new:
|
||||
if [ -e etc/rc.d/rc.bluetooth ]; then
|
||||
cp -a etc/rc.d/rc.bluetooth etc/rc.d/rc.bluetooth.new.incoming
|
||||
cat etc/rc.d/rc.bluetooth.new > etc/rc.d/rc.bluetooth.new.incoming
|
||||
mv etc/rc.d/rc.bluetooth.new.incoming etc/rc.d/rc.bluetooth.new
|
||||
fi
|
||||
|
||||
config etc/rc.d/rc.bluetooth.new
|
||||
config etc/bluetooth/input.conf.new
|
||||
config etc/bluetooth/main.conf.new
|
||||
config etc/bluetooth/network.conf.new
|
||||
config etc/bluetooth/uart.conf.new
|
||||
config etc/default/bluetooth.new
|
||||
|
||||
19
bluez/slack-desc
Normal file
19
bluez/slack-desc
Normal file
@@ -0,0 +1,19 @@
|
||||
# HOW TO EDIT THIS FILE:
|
||||
# The "handy ruler" below makes it easier to edit a package description. Line
|
||||
# up the first '|' above the ':' following the base package name, and the '|'
|
||||
# on the right side marks the last column you can put a character in. You must
|
||||
# make exactly 11 lines for the formatting to be correct. It's also
|
||||
# customary to leave one space after the ':'.
|
||||
|
||||
|-----handy-ruler------------------------------------------------------|
|
||||
bluez: bluez (Bluetooth libraries and utilities)
|
||||
bluez:
|
||||
bluez: Bluez is the Bluetooth stack for Linux, allowing Bluetooth adaptors
|
||||
bluez: and devices to be used with Linux. This package contains the Bluez
|
||||
bluez: libraries, utilities, and other support files.
|
||||
bluez:
|
||||
bluez: Homepage: http://www.bluez.org
|
||||
bluez:
|
||||
bluez:
|
||||
bluez:
|
||||
bluez:
|
||||
Reference in New Issue
Block a user