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
18 PKG_LICENSE
:=GPL-2.0
-or-later
20 PKG_MAINTAINER
:=Simon Peter
<probono@puredarwin.org
>
22 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.gz
23 PKG_MIRROR_HASH
:=98ffd9ead07d6208acf7f713dc6574877d4967bdfb47bf70444ec9d44399faaa
26 include $(INCLUDE_DIR
)/package.mk
28 define Package
/hub-ctrl
31 TITLE
:=Control USB power on a port by port basis
32 URL
:=https
://github.com
/codazoda
/hub-ctrl.c
33 DEPENDS
:=+libusb-compat
36 define Package
/hub-ctrl
/description
37 Control USB power on a port by port basis on some USB hubs.
38 This only works on USB hubs that have the hardware necessary
39 to allow software controlled power switching.
40 Most hubs DO NOT
include the hardware.
44 $(TARGET_CC
) $(TARGET_CFLAGS
) -I
$(STAGING_DIR
)/usr
/include \
45 -L
$(STAGING_DIR
)/usr
/lib
-lusb \
46 -o
$(PKG_BUILD_DIR
)/hub-ctrl
$(PKG_BUILD_DIR
)/hub-ctrl.c
49 define Package
/hub-ctrl
/install
50 $(INSTALL_DIR
) $(1)/usr
/sbin
51 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/hub-ctrl
$(1)/usr
/sbin
/
54 $(eval
$(call BuildPackage
,hub-ctrl
))