bluez: switch to systemd, drop openrc support.
This commit is contained in:
parent
cac0f30e9e
commit
fa32a1c860
|
@ -1,27 +0,0 @@
|
|||
# Configuration file for BlueZ.
|
||||
|
||||
# Activate rfcomm ports (default: no)
|
||||
# RFCOMM_START=yes
|
||||
#
|
||||
# rfcomm configuration file
|
||||
RFCOMM_CONF="/etc/bluetooth/rfcomm.conf"
|
||||
|
||||
#
|
||||
# The following daemons are provided in 'bluez-compat'.
|
||||
#
|
||||
# Start the HID daemon (default: yes)
|
||||
# HIDD_START=no
|
||||
#
|
||||
# Start dial-up networking daemon (default: no)
|
||||
# DUND_START=yes
|
||||
#
|
||||
# Start the PAN daemon (default: no)
|
||||
# PAND_START=yes
|
||||
#
|
||||
# Options passed to daemons when starting.
|
||||
#
|
||||
# BLUETOOTHD_OPTIONS=""
|
||||
# RFCOMM_OPTIONS=""
|
||||
# HIDD_OPTIONS=""
|
||||
# DUND_OPTIONS=""
|
||||
# PAND_OPTIONS=""
|
|
@ -1,63 +0,0 @@
|
|||
#!/sbin/runscript
|
||||
|
||||
depend()
|
||||
{
|
||||
after coldplug
|
||||
need dbus localmount
|
||||
}
|
||||
|
||||
start()
|
||||
{
|
||||
einfo "Starting bluetooth subsystem"
|
||||
eindent
|
||||
|
||||
ebegin "Starting bluetoothd"
|
||||
start-stop-daemon --start --exec /usr/sbin/bluetoothd \
|
||||
$BLUETOOTHD_OPTIONS
|
||||
eend $?
|
||||
if [ -n "$RFCOMM_START" ]; then
|
||||
ebegin "Starting rfcomm"
|
||||
/usr/bin/rfcomm -f $RFCOMM_CONF bind all
|
||||
eend $?
|
||||
fi
|
||||
if [ -n "$HIDD_START" ]; then
|
||||
ebegin "Starting hidd"
|
||||
start-stop-daemon --start --exec /usr/bin/hidd \
|
||||
$HIDD_OPTIONS --server
|
||||
eend $?
|
||||
fi
|
||||
if [ -n "$DUND_START" ]; then
|
||||
ebegin "Starting dund"
|
||||
start-stop-daemon --start --exec /usr/bin/dund \
|
||||
$DUND_OPTIONS
|
||||
eend $?
|
||||
fi
|
||||
if [ -n "$PAND_START" ]; then
|
||||
ebegin "Starting pand"
|
||||
start-stop-daemon --start --exec /usr/bin/pand \
|
||||
$PAND_OPTIONS
|
||||
eend $?
|
||||
fi
|
||||
eoutdent
|
||||
eend $?
|
||||
}
|
||||
|
||||
stop()
|
||||
{
|
||||
ebegin "Stopping bluetooth subsystem"
|
||||
|
||||
if [ -n "$PAND_START" ]; then
|
||||
start-stop-daemon --stop --quiet --exec /usr/bin/pand
|
||||
eend $?
|
||||
fi
|
||||
if [ -n "$DUND_START" ]; then
|
||||
start-stop-daemon --stop --quiet --exec /usr/bin/dund
|
||||
eend $?
|
||||
fi
|
||||
if [ -n "$HIDD_START" ]; then
|
||||
start-stop-daemon --stop --quiet --exec /usr/bin/hidd
|
||||
eend $?
|
||||
fi
|
||||
start-stop-daemon --stop --quiet --exec /usr/sbin/bluetoothd
|
||||
eend $?
|
||||
}
|
|
@ -0,0 +1,12 @@
|
|||
[Unit]
|
||||
Description=Bluetooth Manager
|
||||
After=syslog.target
|
||||
|
||||
[Service]
|
||||
Type=dbus
|
||||
BusName=org.bluez
|
||||
ExecStart=/usr/sbin/bluetoothd -n
|
||||
StandardOutput=syslog
|
||||
|
||||
[Install]
|
||||
WantedBy=bluetooth.target
|
|
@ -1,6 +1,7 @@
|
|||
# Template file for 'bluez'
|
||||
pkgname=bluez
|
||||
version=4.94
|
||||
revision=1
|
||||
distfiles="${KERNEL_SITE}/bluetooth/$pkgname-$version.tar.bz2"
|
||||
build_style=gnu_configure
|
||||
configure_args="--localstatedir=/var --libexecdir=/lib --enable-gstreamer
|
||||
|
@ -19,14 +20,12 @@ long_desc="
|
|||
project distributed under GNU General Public License (GPL)."
|
||||
|
||||
conf_files="
|
||||
/etc/conf.d/bluetooth
|
||||
/etc/bluetooth/audio.conf
|
||||
/etc/bluetooth/input.conf
|
||||
/etc/bluetooth/main.conf
|
||||
/etc/bluetooth/network.conf
|
||||
/etc/bluetooth/serial.conf
|
||||
/etc/bluetooth/rfcomm.conf"
|
||||
openrc_services="bluetooth default true"
|
||||
|
||||
subpackages="$pkgname-alsa $pkgname-compat $pkgname-gstreamer libbluetooth"
|
||||
subpackages="$subpackages libbluetooth-devel"
|
||||
|
@ -50,20 +49,17 @@ Add_dependency build dbus-devel
|
|||
Add_dependency build glib-devel
|
||||
Add_dependency build libusb-compat-devel
|
||||
Add_dependency build libcap-ng-devel
|
||||
Add_dependency build udev ">=0" # This is for udev rules location
|
||||
|
||||
post_install()
|
||||
{
|
||||
cd ${wrksrc}
|
||||
install -d ${DESTDIR}/lib/udev/rules.d
|
||||
install -m644 network/network.conf input/input.conf audio/audio.conf \
|
||||
serial/serial.conf ${DESTDIR}/etc/bluetooth
|
||||
install -m755 scripts/bluetooth_serial ${DESTDIR}/lib/udev
|
||||
install -m755 test/simple-agent \
|
||||
${DESTDIR}/usr/bin/bluez-simple-agent
|
||||
install -d ${DESTDIR}/etc/init.d ${DESTDIR}/etc/conf.d
|
||||
install -m755 ${FILESDIR}/bluetooth.rc \
|
||||
${DESTDIR}/etc/init.d/bluetooth
|
||||
install -m644 ${FILESDIR}/bluetooth.confd \
|
||||
${DESTDIR}/etc/conf.d/bluetooth
|
||||
|
||||
# systemd takes care of bluetoothd initialization.
|
||||
vinstall ${FILESDIR}/bluetooth.service 644 lib/systemd/system
|
||||
rm -f ${DESTDIR}/lib/udev/rules.d/97-bluetooth.rules
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue