No Description

Makefile 1.4KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. #
  2. # Copyright (C) 2015 OpenWrt.org
  3. #
  4. # This is free software, licensed under the GNU General Public License v2.
  5. # See /LICENSE for more information.
  6. #
  7. include $(TOPDIR)/rules.mk
  8. PKG_NAME:=hub-ctrl
  9. PKG_VERSION:=1.0
  10. PKG_RELEASE:=1
  11. PKG_SOURCE_PROTO:=git
  12. PKG_SOURCE_URL:=https://github.com/codazoda/hub-ctrl.c.git
  13. PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
  14. PKG_SOURCE_VERSION:=3eef0240fac90067d081551e9f73dfa741d94a9e
  15. PKG_LICENSE:=GPL-2.0+
  16. PKG_MAINTAINER:=Simon Peter <probono@puredarwin.org>
  17. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  18. PKG_BUILD_PARALLEL:=1
  19. include $(INCLUDE_DIR)/package.mk
  20. define Package/hub-ctrl
  21. SECTION:=utils
  22. CATEGORY:=Utilities
  23. TITLE:=Control USB power on a port by port basis
  24. URL:=https://github.com/codazoda/hub-ctrl.c
  25. DEPENDS:=+libusb-compat
  26. endef
  27. define Package/hub-ctrl/description
  28. Control USB power on a port by port basis on some USB hubs.
  29. This only works on USB hubs that have the hardware necessary
  30. to allow software controlled power switching.
  31. Most hubs DO NOT include the hardware.
  32. endef
  33. define Build/Compile
  34. $(TARGET_CC) $(TARGET_CFLAGS) -I$(STAGING_DIR)/usr/include \
  35. -L$(STAGING_DIR)/usr/lib -lusb \
  36. -o $(PKG_BUILD_DIR)/hub-ctrl $(PKG_BUILD_DIR)/hub-ctrl.c
  37. endef
  38. define Package/hub-ctrl/install
  39. $(INSTALL_DIR) $(1)/usr/sbin
  40. $(INSTALL_BIN) $(PKG_BUILD_DIR)/hub-ctrl $(1)/usr/sbin/
  41. endef
  42. $(eval $(call BuildPackage,hub-ctrl))