From 80fdadde479bc02b5942147feaa68a15835266c1 Mon Sep 17 00:00:00 2001 From: Wouter R Date: Fri, 12 Jul 2013 17:26:12 +0200 Subject: [PATCH] Update Makefile and Config.in to handle/describe new www directory and API test interface properly. --- Config.in | 7 +++---- Makefile | 19 ++++++++++--------- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/Config.in b/Config.in index 8867b8f..3cb1c2b 100644 --- a/Config.in +++ b/Config.in @@ -7,14 +7,13 @@ bool "Enable development aids" default n help - Enable development features (currently a script to copy and zip all relevant - code for updating the git repository, and two shell aliases for convenience, - see /root/.profile). + Enable development features (currently two shell aliases for convenience, + see /root/.profile and a test interface for the REST API). config WIFIBOX_AP_SSID depends on PACKAGE_wifibox string "AP mode SSID" - default "d3d-ap" + default "d3d-ap-%%MAC_TAIL%%" help The SSID the device will use when switching into access point mode. Note: the Lua scripts do not actually use this yet. diff --git a/Makefile b/Makefile index 5470f72..72e75f9 100644 --- a/Makefile +++ b/Makefile @@ -80,12 +80,11 @@ define Package/wifibox/install # $(INSTALL_DIR) $(1)/$(TGT_LUA_DIR_SUFFIX) $(INSTALL_DIR) $(1)/$(TGT_LUA_DIR_SUFFIX)/network - $(INSTALL_DIR) $(1)/$(TGT_LUA_DIR_SUFFIX)/rest +# $(INSTALL_DIR) $(1)/$(TGT_LUA_DIR_SUFFIX)/rest + $(INSTALL_DIR) $(1)/$(TGT_LUA_DIR_SUFFIX)/rest/api $(INSTALL_DIR) $(1)/$(TGT_LUA_DIR_SUFFIX)/script $(INSTALL_DIR) $(1)/$(TGT_LUA_DIR_SUFFIX)/util -# $(INSTALL_DIR) $(1)/$(TGT_LUA_DIR_SUFFIX)/www -# $(INSTALL_DIR) $(1)/$(TGT_LUA_DIR_SUFFIX)/www/cgi-bin - $(INSTALL_DIR) $(1)/$(TGT_LUA_DIR_SUFFIX)/www/wifibox + $(INSTALL_DIR) $(1)/$(TGT_LUA_DIR_SUFFIX)/www $(INSTALL_DIR) $(1)/etc/init.d $(INSTALL_DIR) $(1)/www/cgi-bin @@ -94,26 +93,28 @@ define Package/wifibox/install $(CP) $(WIFIBOX_BASE_DIR)/*.lua $(1)/$(TGT_LUA_DIR_SUFFIX)/ $(CP) $(WIFIBOX_BASE_DIR)/network/*.lua $(1)/$(TGT_LUA_DIR_SUFFIX)/network/ $(CP) $(WIFIBOX_BASE_DIR)/rest/*.lua $(1)/$(TGT_LUA_DIR_SUFFIX)/rest/ + $(CP) $(WIFIBOX_BASE_DIR)/rest/api/*.lua $(1)/$(TGT_LUA_DIR_SUFFIX)/rest/api/ $(CP) $(WIFIBOX_BASE_DIR)/util/*.lua $(1)/$(TGT_LUA_DIR_SUFFIX)/util/ $(CP) $(WIFIBOX_BASE_DIR)/script/wifibox_init $(1)/$(TGT_LUA_DIR_SUFFIX)/script $(CP) $(WIFIBOX_BASE_DIR)/script/d3dapi $(1)/$(TGT_LUA_DIR_SUFFIX)/script - $(CP) $(WIFIBOX_BASE_DIR)/www/* $(1)/$(TGT_LUA_DIR_SUFFIX)/www/ - $(CP) $(WIFIBOX_BASE_DIR)/script/d3dapi $(1)/www/cgi-bin +# $(CP) $(WIFIBOX_BASE_DIR)/www/* $(1)/$(TGT_LUA_DIR_SUFFIX)/www/ + $(CP) $(WIFIBOX_BASE_DIR)/www/* $(1)/www/ #copy www files directly to /www -# $(CP) $(WIFIBOX_BASE_DIR)/www/.autowifi-inplace $(1)/$(TGT_LUA_DIR_SUFFIX)/www - ifeq ($(CONFIG_WIFIBOX_DEVEL_PACKAGE),y) # $(INSTALL_DIR) $(1)/$(TGT_LUA_DIR_SUFFIX)/misc # $(CP) $(WIFIBOX_BASE_DIR)/../misc/collect-code.sh $(1)/$(TGT_LUA_DIR_SUFFIX)/misc/ + + $(INSTALL_DIR) $(1)/$(TGT_LUA_DIR_SUFFIX)/test + $(CP) $(WIFIBOX_BASE_DIR)/test/* $(1)/$(TGT_LUA_DIR_SUFFIX)/test/ + $(LN) -s /$(TGT_LUA_DIR_SUFFIX)/test $(1)/www/ endif ### create links elsewhere in the system (autowifi) $(LN) -s /$(TGT_LUA_DIR_SUFFIX)/script/d3dapi $(1)/www/cgi-bin - $(LN) -s /$(TGT_LUA_DIR_SUFFIX)/www/wifibox $(1)/www $(LN) -s /$(TGT_LUA_DIR_SUFFIX)/script/wifibox_init $(1)/etc/init.d/wifibox_init ### install gpx utility