fwknop: Add start-up dependency on network interface for fwknopd.
[feed/packages.git] / utils / hub-ctrl / Makefile
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
8 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=hub-ctrl
11 PKG_VERSION:=1.0
12 PKG_RELEASE:=1
13
14 PKG_SOURCE_PROTO:=git
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+
19
20 PKG_MAINTAINER:=Simon Peter <probono@puredarwin.org>
21
22 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
23 PKG_MIRROR_HASH:=98ffd9ead07d6208acf7f713dc6574877d4967bdfb47bf70444ec9d44399faaa
24 PKG_BUILD_PARALLEL:=1
25
26 include $(INCLUDE_DIR)/package.mk
27
28 define Package/hub-ctrl
29 SECTION:=utils
30 CATEGORY:=Utilities
31 TITLE:=Control USB power on a port by port basis
32 URL:=https://github.com/codazoda/hub-ctrl.c
33 DEPENDS:=+libusb-compat
34 endef
35
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.
41 endef
42
43 define Build/Compile
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
47 endef
48
49 define Package/hub-ctrl/install
50 $(INSTALL_DIR) $(1)/usr/sbin
51 $(INSTALL_BIN) $(PKG_BUILD_DIR)/hub-ctrl $(1)/usr/sbin/
52 endef
53
54 $(eval $(call BuildPackage,hub-ctrl))