[packages] bluelog: add bluelog, a Bluetooth scanner & logger
authorswalker <swalker@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Sat, 11 Feb 2012 05:37:31 +0000 (05:37 +0000)
committerswalker <swalker@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Sat, 11 Feb 2012 05:37:31 +0000 (05:37 +0000)
git-svn-id: svn://svn.openwrt.org/openwrt/packages@30431 3c298f89-4303-0410-b956-a3cf2f4a3e73

utils/bluelog/Makefile [new file with mode: 0644]
utils/bluelog/files/bluelog.init [new file with mode: 0644]

diff --git a/utils/bluelog/Makefile b/utils/bluelog/Makefile
new file mode 100644 (file)
index 0000000..35f03c3
--- /dev/null
@@ -0,0 +1,75 @@
+#
+# Copyright (C) 2012 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=bluelog
+PKG_VERSION:=1.0.2
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=ftp://ftp.digifail.com/downloads/software/bluelog
+PKG_MD5SUM:=f406d47ec94970be219cbb38f49402f9
+
+PKG_INSTALL:=1
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/bluelog/Default
+  SECTION:=utils
+  CATEGORY:=Utilities
+  TITLE:=Bluetooth scanner and logger
+  URL:=http://www.digifail.com/software/bluelog.shtml
+  DEPENDS:=+bluez-utils +kmod-bluetooth
+endef
+
+define Package/bluelog/Default/description
+  Bluelog is a simple Bluetooth scanner designed to tell you how many
+  discoverable devices there are in an area as quickly as possible. It is
+  intended to be used as a site survey tool, identifying the number of possible
+  Bluetooth targets there are in the surrounding environment.
+endef
+
+define Package/bluelog
+  $(call Package/bluelog/Default)
+endef
+
+define Package/bluelog/description
+  $(call Package/bluelog/Default/description)
+endef
+
+define Package/bluelog-live
+  $(call Package/bluelog/Default)
+  TITLE+= (live output)
+  DEPENDS+= bluelog
+endef
+
+define Package/bluelog-live/description
+  $(call Package/bluelog/Default/description)
+  This package contains the bluelog live output files for use with an SSI
+  capable web server.
+endef
+
+TARGET_CFLAGS += -DOPENWRT
+
+MAKE_FLAGS += \
+        LIBS="$(TARGET_LDFLAGS) -lbluetooth"
+
+define Package/bluelog/install
+       $(INSTALL_DIR) $(1)/usr/bin
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/bluelog $(1)/usr/bin/
+       $(INSTALL_DIR) $(1)/etc/init.d
+       $(INSTALL_BIN) ./files/bluelog.init $(1)/etc/init.d/bluelog
+endef
+
+define Package/bluelog-live/install
+       $(INSTALL_DIR) $(1)/www
+       $(CP) $(PKG_INSTALL_DIR)/var/lib/bluelog $(1)/www/
+endef
+
+$(eval $(call BuildPackage,bluelog))
+$(eval $(call BuildPackage,bluelog-live))
diff --git a/utils/bluelog/files/bluelog.init b/utils/bluelog/files/bluelog.init
new file mode 100644 (file)
index 0000000..efae288
--- /dev/null
@@ -0,0 +1,13 @@
+#!/bin/sh /etc/rc.common
+
+START=65
+
+SERVICE_DAEMONIZE=1
+
+start() {
+       service_start /usr/bin/bluelog
+}
+
+stop() {
+       service_stop /usr/bin/bluelog
+}