iopsys-feed/usb-modeswitch/Makefile
Kenneth Johansson 9959bdf138 build: encode git version in tar file.
apparently changing the git commit used is not enough the build still
takes the file in the dl directory if the filename is same.
2015-10-30 18:56:54 +01:00

49 lines
1.3 KiB
Makefile

#
# Copyright (C) 2008-2010 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:=inteno-usb-modeswitch
PKG_VERSION:=master
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_SOURCE_URL:=https://github.com/trevd/usb-modeswitch.git
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=$(PKG_VERSION)
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
include $(INCLUDE_DIR)/package.mk
define Package/inteno-usb-modeswitch
SECTION:=utils
CATEGORY:=Utilities
DEPENDS:=+libusb-1.0
TITLE:=USB ModeSwitch
URL:=http://www.draisberghof.de/usb_modeswitch/
endef
define Package/inteno-usb-modeswitch/description
A mode switching tool for controlling
"flip flop" (multiple device) USB gear.
endef
define Build/Compile
$(TARGET_CC) $(TARGET_CFLAGS) $(TARGET_CPPFLAGS) $(TARGET_LDFLAGS) \
-lusb-1.0 \
-o $(PKG_BUILD_DIR)/usb_modeswitch \
$(PKG_BUILD_DIR)/usb_modeswitch.c
endef
define Package/inteno-usb-modeswitch/install
$(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/usb_modeswitch $(1)/usr/bin/usb_modeswitch
# $(INSTALL_DIR) $(1)/etc/hotplug.d/usb
# $(INSTALL_DATA) ./files/modeswitch.hotplug $(1)/etc/hotplug.d/usb/20-modeswitch
endef
$(eval $(call BuildPackage,inteno-usb-modeswitch))