Skip to content
This repository has been archived by the owner on Dec 8, 2019. It is now read-only.

Commit

Permalink
Move sweetd, add dbus config, remove bluez5 append
Browse files Browse the repository at this point in the history
  • Loading branch information
davidknezic committed Apr 1, 2019
1 parent 206a373 commit 3a6c39d
Show file tree
Hide file tree
Showing 10 changed files with 28 additions and 113 deletions.
27 changes: 0 additions & 27 deletions recipes-connectivity/bluez5/bluez5_%.xbbappend

This file was deleted.

66 changes: 0 additions & 66 deletions recipes-connectivity/bluez5/files/init

This file was deleted.

1 change: 0 additions & 1 deletion recipes-core/candy/bluez5_%.bbappend

This file was deleted.

1 change: 0 additions & 1 deletion recipes-core/candy/dnsmasq_%.bbappend

This file was deleted.

1 change: 0 additions & 1 deletion recipes-core/candy/hostapd_%.bbappend

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,24 @@
"http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd">
<busconfig>
<policy user="root">
<allow own="land.lightning"/>
<allow own_prefix="land.lightning"/>
<allow send_destination="land.lightning" send_interface="land.lightning"/>
<allow send_destination="land.lightning" send_interface="org.freedesktop.DBus.Introspectable"/>
<allow send_destination="land.lightning" send_interface="org.freedesktop.DBus.Properties"/>
<allow send_destination="land.lightning" send_interface="org.freedesktop.DBus.ObjectManager"/>
<allow send_destination="land.lightning"/>

<allow own="org.bluez"/>
<allow send_destination="org.bluez"/>
<allow send_interface="org.bluez.Agent1"/>
<allow send_interface="org.bluez.MediaEndpoint1"/>
<allow send_interface="org.bluez.MediaPlayer1"/>
<allow send_interface="org.bluez.Profile1"/>
<allow send_interface="org.bluez.GattCharacteristic1"/>
<allow send_interface="org.bluez.GattDescriptor1"/>
<allow send_interface="org.bluez.LEAdvertisement1"/>
<allow send_interface="org.bluez.LEAdvertisingManager1"/>
<allow send_interface="org.freedesktop.DBus.Introspectable"/>
<allow send_interface="org.freedesktop.DBus.ObjectManager"/>
<allow send_interface="org.freedesktop.DBus.Properties"/>
</policy>

<policy at_console="true">
<allow send_destination="org.bluez"/>
</policy>

<policy context="default">
<deny send_destination="org.bluez"/>
</policy>
</busconfig>
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,13 @@ delay_stop() {
}

case "$1" in
start) echo -n "Starting $NAME: "
start) echo -n "Running btuart: "
btuart
echo "btuart."
echo -n "Running bthelper hci0: "
bthelper hci0
echo "bthelper."
echo -n "Starting $NAME: "
start-stop-daemon -S -b -x $DAEMON -- $EXTRA_OPTS
echo "$NAME."
;;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,18 @@ PR = "r0"
PROVIDES = "sweetd"
RPROVIDES_${PN} = "sweetd"

RDEPENDS_${PN} = " wpa-supplicant iw hostapd dnsmasq"
RDEPENDS_${PN} = " wpa-supplicant bluez5 pi-bluetooth"

SRC_URI = "\
https://github.com/the-lightning-land/sweetd/releases/download/v${VERSION}/sweetd_${VERSION}_linux_armv6.tar.gz;sha256sum=${SHA256SUM} \
file://init \
file://default \
file://sweetd.init \
file://sweetd.default \
file://sweet.conf \
file://sweetd.service \
"

FILESEXTRAPATHS_prepend := "${THISDIR}/files:"

inherit update-rc.d systemd

INITSCRIPT_NAME = "sweetd"
Expand All @@ -34,10 +37,11 @@ do_install() {
install -m 0755 ${WORKDIR}/sweetd_${VERSION}_linux_armv6/sweetd ${D}${bindir}/sweetd
install -m 0644 ${WORKDIR}/sweetd_${VERSION}_linux_armv6/README.md ${D}${docdir}/sweetd/README

install -m 0755 -d ${D}${sysconfdir}/init.d ${D}${sysconfdir}/default
install -m 0755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/sweetd
install -m 0755 ${WORKDIR}/default ${D}${sysconfdir}/default/sweetd
install -m 0755 -d ${D}${sysconfdir}/init.d ${D}${sysconfdir}/default ${D}${sysconfdir}/dbus-1 ${D}${sysconfdir}/dbus-1/system.d
install -m 0755 ${WORKDIR}/sweetd.init ${D}${sysconfdir}/init.d/sweetd
sed -i -e 's,@BINDIR@,${bindir},g' -e 's,@SYSCONFDIR@,${sysconfdir},g' ${D}${sysconfdir}/init.d/sweetd
install -m 0755 ${WORKDIR}/sweetd.default ${D}${sysconfdir}/default/sweetd
install -m 0755 ${WORKDIR}/sweet.conf ${D}${sysconfdir}/dbus-1/system.d/

install -m 0755 -d ${D}${systemd_unitdir}/system/
install -m 0644 ${WORKDIR}/sweetd.service ${D}${systemd_unitdir}/system/
Expand All @@ -48,5 +52,6 @@ FILES_${PN} = "\
${bindir}/sweetd \
${sysconfdir}/init.d/sweetd \
${sysconfdir}/default/sweetd \
${sysconfdir}/dbus-1/system.d/sweet.conf \
${systemd_unitdir}/system/sweetd.service \
"

0 comments on commit 3a6c39d

Please sign in to comment.