2 # Copyright (C) 2015 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
15 PKG_SOURCE_URL
:=https
://github.com
/codazoda
/hub-ctrl.c.git
16 PKG_SOURCE_SUBDIR
:=$(PKG_NAME
)-$(PKG_VERSION
)
17 PKG_SOURCE_VERSION
:=3eef0240fac90067d081551e9f73dfa741d94a9e
20 PKG_MAINTAINER
:=Simon Peter
<probono@puredarwin.org
>
22 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.gz
25 include $(INCLUDE_DIR
)/package.mk
27 define Package
/hub-ctrl
30 TITLE
:=Control USB power on a port by port basis
31 URL
:=https
://github.com
/codazoda
/hub-ctrl.c
32 DEPENDS
:=+libusb-compat
35 define Package
/hub-ctrl
/description
36 Control USB power on a port by port basis on some USB hubs.
37 This only works on USB hubs that have the hardware necessary
38 to allow software controlled power switching.
39 Most hubs DO NOT
include the hardware.
43 $(TARGET_CC
) $(TARGET_CFLAGS
) -I
$(STAGING_DIR
)/usr
/include \
44 -L
$(STAGING_DIR
)/usr
/lib
-lusb \
45 -o
$(PKG_BUILD_DIR
)/hub-ctrl
$(PKG_BUILD_DIR
)/hub-ctrl.c
48 define Package
/hub-ctrl
/install
49 $(INSTALL_DIR
) $(1)/usr
/sbin
50 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/hub-ctrl
$(1)/usr
/sbin
/
53 $(eval
$(call BuildPackage
,hub-ctrl
))