2 # Copyright (C) 2012-2013 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
8 include $(TOPDIR
)/rules.mk
14 PKG_SOURCE
:=Bluelog-
$(PKG_VERSION
).
tar.gz
15 PKG_SOURCE_URL
:=https
://codeload.github.com
/MS3FGX
/Bluelog
/tar.gz
/$(PKG_VERSION
)?
16 PKG_HASH
:=ebbc1357e14bc46cbddd8390cdbd29c0131b09b8ab680a1c382164ef076cb53e
17 PKG_BUILD_DIR
:=$(BUILD_DIR
)/Bluelog-
$(PKG_VERSION
)
19 OUI_SOURCE
:=oui-2016-05-30.txt.gz
20 OUI_URL
:=https
://sources.openwrt.org
/
21 OUI_HASH
:=19d0b02eeb0d42507ee17b637a295782c14956fe1ac4803589ed93ef92c4fad5
24 PKG_LICENSE_FILES
:=COPYING
25 PKG_MAINTAINER
:=Nicolas Thill
<nico@openwrt.org
>
30 include $(INCLUDE_DIR
)/package.mk
32 define Package
/bluelog
/Default
35 TITLE
:=Bluetooth scanner and logger
36 URL
:=https
://github.com
/MS3FGX
/Bluelog
37 DEPENDS
:=+bluez-libs
+kmod-bluetooth
40 define Package
/bluelog
/Default
/description
41 Bluelog is a simple Bluetooth scanner designed to tell you how many
42 discoverable devices there are in an area
as quickly
as possible. It is
43 intended to be used
as a site survey tool
, identifying the number of possible
44 Bluetooth targets there are in the surrounding environment.
47 define Package
/bluelog
48 $(call Package
/bluelog
/Default
)
51 define Package
/bluelog
/description
52 $(call Package
/bluelog
/Default
/description
)
55 define Package
/bluelog-live
56 $(call Package
/bluelog
/Default
)
61 define Package
/bluelog-live
/description
62 $(call Package
/bluelog
/Default
/description
)
63 This package contains the files for
"Bluelog Live", an optional mode of
64 Bluelog which creates a real-time webpage of discovered Bluetooth devices.
67 define Download
/oui.txt
73 TARGET_CFLAGS
+= -DOPENWRT
76 LIBS
="$(TARGET_LDFLAGS) -lbluetooth -lm"
79 $(eval
$(call Download
,oui.txt
))
80 $(Build
/Prepare
/Default
)
81 gzip
-dc
$(DL_DIR
)/$(OUI_SOURCE
) > $(PKG_BUILD_DIR
)/oui.tmp
84 define Package
/bluelog
/install
85 $(INSTALL_DIR
) $(1)/usr
/bin
86 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/bluelog
$(1)/usr
/bin
/
87 $(INSTALL_DIR
) $(1)/etc
/init.d
88 $(INSTALL_BIN
) .
/files
/bluelog.init
$(1)/etc
/init.d
/bluelog
91 define Package
/bluelog-live
/install
92 $(INSTALL_DIR
) $(1)/www
/bluelog
93 $(CP
) $(PKG_INSTALL_DIR
)/usr
/share
/bluelog
/*.html
$(1)/www
/bluelog
/
95 $(PKG_INSTALL_DIR
)/usr
/share
/bluelog
/openwrt.css \
96 $(1)/www
/bluelog
/style.css
97 $(INSTALL_DIR
) $(1)/www
/bluelog
/images
99 $(PKG_INSTALL_DIR
)/usr
/share
/bluelog
/images
/digifail_logo.png \
100 $(PKG_INSTALL_DIR
)/usr
/share
/bluelog
/images
/email.png \
101 $(PKG_INSTALL_DIR
)/usr
/share
/bluelog
/images
/favicon.png \
102 $(PKG_INSTALL_DIR
)/usr
/share
/bluelog
/images
/openwrt_logo.png \
103 $(PKG_INSTALL_DIR
)/usr
/share
/bluelog
/images
/qrcontact.png \
104 $(1)/www
/bluelog
/images
/
105 $(INSTALL_DIR
) $(1)/www
/cgi-bin
106 $(CP
) $(PKG_INSTALL_DIR
)/usr
/share
/bluelog
/cgi-bin
/* $(1)/www
/cgi-bin
/
109 $(eval
$(call BuildPackage
,bluelog
))
110 $(eval
$(call BuildPackage
,bluelog-live
))