Last active
September 12, 2016 10:37
-
-
Save simonmorley/e8318ad1db8474494ce15432d724af77 to your computer and use it in GitHub Desktop.
SocketMan OpenWRT Test Makefile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Copyright (C) 2016 Cucumber WiFi | |
# | |
# This is free software, licensed under the GNU General Public License v2. | |
CUCUMBER="-D__OPENWRT__" | |
# CUCUMBER += "-D__OPENWRT__" | |
# TARGET_CFLAGS += $(FPIC) | |
# TARGET_CFLAGS += "-DPUMPY" | |
# TESTING=-DPUMPY | |
include $(TOPDIR)/rules.mk | |
PKG_NAME:=SocketMan | |
PKG_SOURCE_PROTO:=git | |
PKG_SOURCE_VERSION:=$(COMMIT) | |
PKG_SOURCE_SUBDIR:=$(PKG_NAME) | |
PKG_SOURCE_URL:=https://github.com/cucumber-tony/SocketMan.git | |
PKG_SOURCE:=$(PKG_NAME).tar.gz | |
PKG_VERSION:=v1 | |
include $(INCLUDE_DIR)/package.mk | |
define Package/socketman | |
SECTION:=cucumber | |
CATEGORY:=Cucumber Tony | |
DEPENDS:=+libjson-c +curl +libcurl +libopenssl +libpthread +libmosquitto +@LIBCURL_OPENSSL +libc +libnl | |
TITLE:=SocketMan communication package for Cucumber Tony | |
URL:=http://www.cucumberwifi.io | |
endef | |
define Build/Prepare | |
mkdir -p $(PKG_BUILD_DIR) | |
mkdir -p $(PKG_BUILD_DIR)/build | |
mkdir -p $(PKG_BUILD_DIR)/obj | |
tar -C $(DL_DIR) -xzvf $(DL_DIR)/$(PKG_NAME).tar.gz | |
$(CP) $(DL_DIR)/$(PKG_NAME)/src/* $(PKG_BUILD_DIR)/ | |
endef | |
# define Package/socketman/conffiles | |
# /etc/config/socketman | |
# endef | |
define Package/socketman/description | |
This package contains the communication package of CT | |
endef | |
define Package/socketman/install | |
$(INSTALL_DIR) $(1)/usr/bin | |
$(CP) $(PKG_BUILD_DIR)/socketman $(1)/usr/bin/socketman | |
$(INSTALL_DIR) $(1)/etc/init.d | |
$(INSTALL_BIN) files/socketman.init $(1)/etc/init.d/socketman | |
endef | |
$(eval $(call BuildPackage,socketman)) | |
.PHONY: clean | |
clean: | |
rm -rf $(DL_DIR)/$(PKG_NAME)* |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
We always export the vars before, because they don't always get set during compile. I don't know why...
Then compile with: