lede-packages-rs

git clone git://archive.git.mtrnord.blog/MTRNord/lede-packages-rs.git
Log | Files | Refs | README | LICENSE

commit ebcd0936eee2dc6ba9e12f4efffe3b971ed7f23f
parent 9082a3efac29cbe347a2bfe405f9efbf5524e4e5
Author: Ted Hess <thess@kitschensync.net>
Date:   Sun, 25 Jan 2015 18:57:30 -0500

Merge pull request #819 from probonopd/hub-ctrl

hub-ctrl: Control USB power on a port by port basis
Diffstat:
Autils/hub-ctrl/Makefile | 53+++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 53 insertions(+), 0 deletions(-)

diff --git a/utils/hub-ctrl/Makefile b/utils/hub-ctrl/Makefile @@ -0,0 +1,53 @@ +# +# Copyright (C) 2015 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=hub-ctrl +PKG_VERSION:=1.0 +PKG_RELEASE:=1 + +PKG_SOURCE_PROTO:=git +PKG_SOURCE_URL:=https://github.com/codazoda/hub-ctrl.c.git +PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) +PKG_SOURCE_VERSION:=3eef0240fac90067d081551e9f73dfa741d94a9e +PKG_LICENSE:=GPL-2.0+ + +PKG_MAINTAINER:=Simon Peter <probono@puredarwin.org> + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_BUILD_PARALLEL:=1 + +include $(INCLUDE_DIR)/package.mk + +define Package/hub-ctrl + SECTION:=utils + CATEGORY:=Utilities + TITLE:=Control USB power on a port by port basis + URL:=https://github.com/codazoda/hub-ctrl.c + DEPENDS:=+libusb-compat +endef + +define Package/hub-ctrl/description + Control USB power on a port by port basis on some USB hubs. + This only works on USB hubs that have the hardware necessary + to allow software controlled power switching. + Most hubs DO NOT include the hardware. +endef + +define Build/Compile + $(TARGET_CC) $(TARGET_CFLAGS) -I$(STAGING_DIR)/usr/include \ + -L$(STAGING_DIR)/usr/lib -lusb \ + -o $(PKG_BUILD_DIR)/hub-ctrl $(PKG_BUILD_DIR)/hub-ctrl.c +endef + +define Package/hub-ctrl/install + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/hub-ctrl $(1)/usr/sbin/ +endef + +$(eval $(call BuildPackage,hub-ctrl))