Skip to content
Snippets Groups Projects
Commit d1f01a58 authored by Matthias Schiffer's avatar Matthias Schiffer
Browse files

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
parent dece1f41
No related branches found
No related tags found
No related merge requests found
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))
include $(TOPDIR)/rules.mk include $(TOPDIR)/rules.mk
PKG_NAME:=gluon-alfred PKG_NAME:=gluon-alfred
PKG_VERSION:=0.1 PKG_VERSION:=1
PKG_RELEASE:=1.$(GLUON_CONFIG_VERSION) PKG_RELEASE:=1
PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME) PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)
...@@ -11,7 +11,7 @@ include $(INCLUDE_DIR)/package.mk ...@@ -11,7 +11,7 @@ include $(INCLUDE_DIR)/package.mk
define Package/gluon-alfred define Package/gluon-alfred
SECTION:=gluon SECTION:=gluon
CATEGORY:=Gluon CATEGORY:=Gluon
DEPENDS:=+alfred +gluon-cron DEPENDS:=+gluon-core +gluon-location +gluon-cron +alfred
TITLE:=Configure alfred TITLE:=Configure alfred
endef endef
......
...@@ -16,6 +16,7 @@ set -e ...@@ -16,6 +16,7 @@ set -e
json_init json_init
json_add_string "name" "$(uci get 'system.@system[0].hostname')" json_add_string "name" "$(uci get 'system.@system[0].hostname')"
if [ "$(uci get 'system.@system[0].share_location')" = 1 ]; then 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 fi
json_dump | tr -d '\n' | alfred -s "$ALFRED_DATA_TYPE" json_dump | tr -d '\n' | alfred -s "$ALFRED_DATA_TYPE"
*/5 * * * * /lib/gluon/alfred/announce.sh
#!/bin/sh #!/bin/sh
uci set alfred.alfred.interface=br-client . /lib/functions.sh
uci set alfred.alfred.mode=slave
uci delete alfred.alfred.disabled 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
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment