Makefile (3070B)
1 # 2 # Copyright (C) 2012-2013 OpenWrt.org 3 # 4 # This is free software, licensed under the GNU General Public License v2. 5 # See /LICENSE for more information. 6 # 7 8 include $(TOPDIR)/rules.mk 9 10 PKG_NAME:=bluelog 11 PKG_VERSION:=1.1.2 12 PKG_RELEASE:=2 13 14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz 15 PKG_SOURCE_URL:=ftp://ftp.digifail.com/software/bluelog 16 PKG_MD5SUM:=614d0fe65bae68acff1d33d9f86e4805 17 18 OUI_SOURCE:=oui-2016-05-30.txt.gz 19 OUI_URL:=http://sources.lede-project.org/ 20 OUI_MD5SUM:=38048729fdb5a7a7e0c5db6a51dc2dd1 21 22 PKG_LICENSE:=GPL-2.0 23 PKG_LICENSE_FILES:=COPYING 24 PKG_MAINTAINER:=Nicolas Thill <nico@openwrt.org> 25 26 PKG_INSTALL:=1 27 28 include $(INCLUDE_DIR)/package.mk 29 30 define Package/bluelog/Default 31 SECTION:=utils 32 CATEGORY:=Utilities 33 TITLE:=Bluetooth scanner and logger 34 URL:=http://www.digifail.com/software/bluelog.shtml 35 DEPENDS:=+bluez-libs +kmod-bluetooth 36 endef 37 38 define Package/bluelog/Default/description 39 Bluelog is a simple Bluetooth scanner designed to tell you how many 40 discoverable devices there are in an area as quickly as possible. It is 41 intended to be used as a site survey tool, identifying the number of possible 42 Bluetooth targets there are in the surrounding environment. 43 endef 44 45 define Package/bluelog 46 $(call Package/bluelog/Default) 47 endef 48 49 define Package/bluelog/description 50 $(call Package/bluelog/Default/description) 51 endef 52 53 define Package/bluelog-live 54 $(call Package/bluelog/Default) 55 TITLE+= (live output) 56 DEPENDS+= bluelog 57 endef 58 59 define Package/bluelog-live/description 60 $(call Package/bluelog/Default/description) 61 This package contains the files for "Bluelog Live", an optional mode of 62 Bluelog which creates a real-time webpage of discovered Bluetooth devices. 63 endef 64 65 define Download/oui.txt 66 FILE:=$(OUI_SOURCE) 67 URL:=$(OUI_URL) 68 MD5SUM:=$(OUI_MD5SUM) 69 endef 70 71 TARGET_CFLAGS += -DOPENWRT 72 73 MAKE_FLAGS += \ 74 LIBS="$(TARGET_LDFLAGS) -lbluetooth -lm" 75 76 define Build/Prepare 77 $(eval $(call Download,oui.txt)) 78 $(Build/Prepare/Default) 79 zcat $(DL_DIR)/$(OUI_SOURCE) > $(PKG_BUILD_DIR)/oui.tmp 80 endef 81 82 define Package/bluelog/install 83 $(INSTALL_DIR) $(1)/usr/bin 84 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/bluelog $(1)/usr/bin/ 85 $(INSTALL_DIR) $(1)/etc/init.d 86 $(INSTALL_BIN) ./files/bluelog.init $(1)/etc/init.d/bluelog 87 endef 88 89 define Package/bluelog-live/install 90 $(INSTALL_DIR) $(1)/www/bluelog 91 $(CP) $(PKG_INSTALL_DIR)/usr/share/bluelog/*.html $(1)/www/bluelog/ 92 $(CP) \ 93 $(PKG_INSTALL_DIR)/usr/share/bluelog/openwrt.css \ 94 $(1)/www/bluelog/style.css 95 $(INSTALL_DIR) $(1)/www/bluelog/images 96 $(CP) \ 97 $(PKG_INSTALL_DIR)/usr/share/bluelog/images/digifail_logo.png \ 98 $(PKG_INSTALL_DIR)/usr/share/bluelog/images/email.png \ 99 $(PKG_INSTALL_DIR)/usr/share/bluelog/images/favicon.png \ 100 $(PKG_INSTALL_DIR)/usr/share/bluelog/images/openwrt_logo.png \ 101 $(PKG_INSTALL_DIR)/usr/share/bluelog/images/qrcontact.png \ 102 $(1)/www/bluelog/images/ 103 $(INSTALL_DIR) $(1)/www/cgi-bin 104 $(CP) $(PKG_INSTALL_DIR)/usr/share/bluelog/cgi-bin/* $(1)/www/cgi-bin/ 105 endef 106 107 $(eval $(call BuildPackage,bluelog)) 108 $(eval $(call BuildPackage,bluelog-live))