Clean up gluon-alfred

* Merge gluon-alfred-ffmap into gluon-alfred
* Use gluon-crond instead of alfred's "facter" mechanism based on the broken busybox crond
This commit is contained in:
Matthias Schiffer 2014-01-12 22:35:00 +01:00
parent dece1f4122
commit d1f01a588f
5 changed files with 21 additions and 40 deletions

View File

@ -1,32 +0,0 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=gluon-alfred-ffmap
PKG_VERSION:=0.1
PKG_RELEASE:=1.$(GLUON_CONFIG_VERSION)
PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)
include $(INCLUDE_DIR)/package.mk
define Package/gluon-alfred-ffmap
SECTION:=gluon
CATEGORY:=Gluon
DEPENDS:=+gluon-alfred +gluon-location
TITLE:=Distribute data for ffmap via alfred
endef
define Build/Prepare
mkdir -p $(PKG_BUILD_DIR)
endef
define Build/Configure
endef
define Build/Compile
endef
define Package/gluon-alfred-ffmap/install
$(CP) ./files/* $(1)/
endef
$(eval $(call BuildPackage,gluon-alfred-ffmap))

View File

@ -1,8 +1,8 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=gluon-alfred
PKG_VERSION:=0.1
PKG_RELEASE:=1.$(GLUON_CONFIG_VERSION)
PKG_VERSION:=1
PKG_RELEASE:=1
PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)
@ -11,7 +11,7 @@ include $(INCLUDE_DIR)/package.mk
define Package/gluon-alfred
SECTION:=gluon
CATEGORY:=Gluon
DEPENDS:=+alfred +gluon-cron
DEPENDS:=+gluon-core +gluon-location +gluon-cron +alfred
TITLE:=Configure alfred
endef

View File

@ -16,6 +16,7 @@ set -e
json_init
json_add_string "name" "$(uci get 'system.@system[0].hostname')"
if [ "$(uci get 'system.@system[0].share_location')" = 1 ]; then
json_add_string "gps" "$(uci get 'system.@system[0].latitude') $(uci get 'system.@system[0].longitude')"
json_add_string "location" "$(uci get 'system.@system[0].latitude') $(uci get 'system.@system[0].longitude')"
fi
json_dump | tr -d '\n' | alfred -s "$ALFRED_DATA_TYPE"

View File

@ -0,0 +1 @@
*/5 * * * * /lib/gluon/alfred/announce.sh

View File

@ -1,5 +1,16 @@
#!/bin/sh
uci set alfred.alfred.interface=br-client
uci set alfred.alfred.mode=slave
uci delete alfred.alfred.disabled
. /lib/functions.sh
uci_remove alfred alfred
uci_add alfred alfred alfred
uci_set alfred alfred interface 'br-client'
uci_set alfred alfred mode 'slave'
uci_set alfred alfred batmanif 'bat0'
uci_set alfred alfred start_vis '1'
uci_set alfred alfred run_facters '0'
uci_commit alfred
/etc/init.d/alfred enable