0
0
mirror of https://github.com/Doodle3D/doodle3d-firmware.git synced 2024-12-22 11:03:48 +01:00

Restructure src directory; add GPX utility

This commit is contained in:
Wouter R 2013-05-14 16:09:01 +02:00
parent ce11cd8c1d
commit 7778bdd6e2
25 changed files with 37 additions and 15 deletions

3
.gitmodules vendored Normal file
View File

@ -0,0 +1,3 @@
[submodule "src/util/GPX.git"]
path = src/util/GPX.git
url = git://github.com/whpthomas/GPX.git

View File

@ -70,9 +70,12 @@ endef
# directory if it does not already exist. Likewise $(INSTALL_BIN) contains the
# command to copy the binary file from its current location (in our case the build
# directory) to the install directory.
define Package/wifibox/install
### create required directories
AUTOWIFI_BASE_DIR := $(PKG_BUILD_DIR)/autowifi
GPX_BASE_DIR := $(PKG_BUILD_DIR)/util/GPX.git
define Package/wifibox/install
### create required directories (autowifi)
# $(INSTALL_DIR) $(1)/usr/share/lua/autowifi
$(INSTALL_DIR) $(1)/usr/share/lua/autowifi/admin
@ -82,32 +85,35 @@ define Package/wifibox/install
$(INSTALL_DIR) $(1)/etc/rc.d
$(INSTALL_DIR) $(1)/www/cgi-bin
### create all files in /usr/share/lua/autowifi (autowifi)
### create all files in /usr/share/lua/autowifi
$(CP) $(AUTOWIFI_BASE_DIR)/*.lua $(1)/usr/share/lua/autowifi/
$(CP) $(AUTOWIFI_BASE_DIR)/admin/* $(1)/usr/share/lua/autowifi/admin/
$(CP) $(PKG_BUILD_DIR)/*.lua $(1)/usr/share/lua/autowifi/
$(CP) $(PKG_BUILD_DIR)/admin/* $(1)/usr/share/lua/autowifi/admin/
$(CP) $(AUTOWIFI_BASE_DIR)/ext/autowifi.js $(1)/usr/share/lua/autowifi/ext
$(CP) $(AUTOWIFI_BASE_DIR)/ext/autowifi_init $(1)/usr/share/lua/autowifi/ext
$(CP) $(AUTOWIFI_BASE_DIR)/ext/wfcf $(1)/usr/share/lua/autowifi/ext
$(CP) $(PKG_BUILD_DIR)/ext/autowifi.js $(1)/usr/share/lua/autowifi/ext
$(CP) $(PKG_BUILD_DIR)/ext/autowifi_init $(1)/usr/share/lua/autowifi/ext
$(CP) $(PKG_BUILD_DIR)/ext/wfcf $(1)/usr/share/lua/autowifi/ext
$(CP) $(PKG_BUILD_DIR)/ext/www/.autowifi-inplace $(1)/usr/share/lua/autowifi/ext/www
$(CP) $(PKG_BUILD_DIR)/ext/www/index.html $(1)/usr/share/lua/autowifi/ext/www
$(CP) $(AUTOWIFI_BASE_DIR)/ext/www/.autowifi-inplace $(1)/usr/share/lua/autowifi/ext/www
$(CP) $(AUTOWIFI_BASE_DIR)/ext/www/index.html $(1)/usr/share/lua/autowifi/ext/www
$(LN) -s /usr/share/lua/autowifi/admin $(1)/usr/share/lua/autowifi/ext/www
$(LN) -s /usr/share/lua/autowifi/ext/wfcf $(1)/usr/share/lua/autowifi/ext/www/cgi-bin
ifeq ($(CONFIG_WIFIBOX_DEVEL_PACKAGE),y)
$(INSTALL_DIR) $(1)/usr/share/lua/autowifi/misc
$(CP) $(PKG_BUILD_DIR)/misc/collect-code.sh $(1)/usr/share/lua/autowifi/misc/
$(CP) $(AUTOWIFI_BASE_DIR)/misc/collect-code.sh $(1)/usr/share/lua/autowifi/misc/
endif
### create links elsewhere in the system
### create links elsewhere in the system (autowifi)
$(LN) -s /usr/share/lua/autowifi/ext/wfcf $(1)/www/cgi-bin
$(LN) -s /usr/share/lua/autowifi/admin $(1)/www
$(LN) -s /usr/share/lua/autowifi/ext/autowifi_init $(1)/etc/rc.d/S18autowifi_init
### install gpx utility
$(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_BIN) $(GPX_BASE_DIR)/gpx $(1)/usr/bin
endef
define Package/wifibox/postinst

View File

@ -8,6 +8,9 @@
- write a shellscript to automate tasks like swapping out /www and packaging modified code for git merging
- add dependency on either wr703n or mr3020 (and probably comment it out to avoid being to conservative...)
- see if updating works when a new version is 'released' (probably needs a real feed)
- add aliases to root profile only when debugging was requested in menuconfig
- symlinks created in the install section of the Makefile should perhaps be created in the postinstall script,
this way the package is truly relocatable
- add config option to compile sources using luac?
- add/link general OpenWrt build instructions for OSX to installation page on wiki.
- remove usr/share/lua/autowifi and subdirectories (if empty) in postrm

View File

@ -1,5 +1,6 @@
#!/bin/sh
### This function makes sure the 'wlan' net is in the 'lan' zone
addFirewallNet() {
cfgChanged=0; zoneNum=-1; i=0
@ -32,6 +33,7 @@ addFirewallNet() {
}
### Replace the banner with a custom one
if [ ! -f /etc/banner.default ]; then
mv /etc/banner /etc/banner.default
cat <<-'EOM' > /etc/banner
@ -46,6 +48,7 @@ if [ ! -f /etc/banner.default ]; then
EOM
fi
### Add some convenience functionality to root's profile
grep '^# DO NOT MODIFY.*wifibox package.$' /root/.profile >/dev/null 2>&1
if [ $? -eq 1 ]; then
cat <<-EOM >> /root/.profile
@ -56,6 +59,8 @@ if [ $? -eq 1 ]; then
EOM
fi
### Finally make sure basic configuration is set correctly
echo "Enabling wifi device..."
uci set wireless.@wifi-device[0].disabled=0; uci commit wireless; wifi

View File

@ -1,5 +1,9 @@
GPX_PATH := util/GPX.git
.PHONY: $(GPX_PATH)
all:
@echo "No compilation here...(dummy Makefile to keep buildroot happy)"
$(MAKE) -C $(GPX_PATH)
clean:
@echo "No cleaning here... (dummy Makefile to keep buildroot happy)"
$(MAKE) -C $(GPX_PATH) clean

1
src/util/GPX.git Submodule

@ -0,0 +1 @@
Subproject commit bbca5831055e25fc312e5ff8b31f32771925bb9f