diff --git a/package/gluon-alfred-ffmap/Makefile b/package/gluon-alfred-ffmap/Makefile deleted file mode 100644 index cc3bbc3c..00000000 --- a/package/gluon-alfred-ffmap/Makefile +++ /dev/null @@ -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)) diff --git a/package/gluon-alfred/Makefile b/package/gluon-alfred/Makefile index c67d9208..8290ad82 100644 --- a/package/gluon-alfred/Makefile +++ b/package/gluon-alfred/Makefile @@ -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 diff --git a/package/gluon-alfred-ffmap/files/etc/alfred/ffmap.sh b/package/gluon-alfred/files/lib/gluon/alfred/announce.sh similarity index 79% rename from package/gluon-alfred-ffmap/files/etc/alfred/ffmap.sh rename to package/gluon-alfred/files/lib/gluon/alfred/announce.sh index a79addd1..6b890a78 100755 --- a/package/gluon-alfred-ffmap/files/etc/alfred/ffmap.sh +++ b/package/gluon-alfred/files/lib/gluon/alfred/announce.sh @@ -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')" -fi + 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" diff --git a/package/gluon-alfred/files/lib/gluon/cron/alfred b/package/gluon-alfred/files/lib/gluon/cron/alfred new file mode 100644 index 00000000..98cc382e --- /dev/null +++ b/package/gluon-alfred/files/lib/gluon/cron/alfred @@ -0,0 +1 @@ +*/5 * * * * /lib/gluon/alfred/announce.sh diff --git a/package/gluon-alfred/files/lib/gluon/upgrade/alfred/invariant/010-enable-alfred b/package/gluon-alfred/files/lib/gluon/upgrade/alfred/invariant/010-enable-alfred index 20ff5df4..755fff3b 100755 --- a/package/gluon-alfred/files/lib/gluon/upgrade/alfred/invariant/010-enable-alfred +++ b/package/gluon-alfred/files/lib/gluon/upgrade/alfred/invariant/010-enable-alfred @@ -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