mirror of
https://github.com/motioneye-project/motioneyeos.git
synced 2025-07-30 22:56:33 +00:00
usb_modeswitch: use GENTARGETS instead of AUTOTARGETS
usb_modeswitch build system is just a simple Makefile, so the GENTARGETS infrastructure is more appropriate than the AUTOTARGETS infrastructure. The build system is slightly fixed through a small patch, that replaces the previous "nostrip" patch. The latest version of usb_modeswitch is 1.1.1, but it now relies on udev and requires TCL to operate. Someone actually using usb_modeswitch would probably be at a better place to do this version bump. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
This commit is contained in:
parent
e237c99357
commit
6caec6f3b3
@ -0,0 +1,29 @@
|
|||||||
|
---
|
||||||
|
Makefile | 7 +++----
|
||||||
|
1 file changed, 3 insertions(+), 4 deletions(-)
|
||||||
|
|
||||||
|
Index: usb_modeswitch-1.0.7/Makefile
|
||||||
|
===================================================================
|
||||||
|
--- usb_modeswitch-1.0.7.orig/Makefile
|
||||||
|
+++ usb_modeswitch-1.0.7/Makefile
|
||||||
|
@@ -1,8 +1,8 @@
|
||||||
|
PROG = usb_modeswitch
|
||||||
|
VERS = 1.0.7
|
||||||
|
STRIP = strip
|
||||||
|
-CC = gcc
|
||||||
|
-CCFLAGS = -l usb -Wall
|
||||||
|
+CC ?= gcc
|
||||||
|
+CFLAGS += -l usb -Wall
|
||||||
|
RM = /bin/rm -f
|
||||||
|
OBJS = usb_modeswitch.c
|
||||||
|
PREFIX = $(DESTDIR)/usr
|
||||||
|
@@ -12,8 +12,7 @@
|
||||||
|
.PHONY: clean
|
||||||
|
all: $(PROG)
|
||||||
|
$(PROG): $(OBJS)
|
||||||
|
- $(CC) $(CCFLAGS) -o $(PROG) $(OBJS)
|
||||||
|
- $(STRIP) $(PROG)
|
||||||
|
+ $(CC) $(CFLAGS) -o $(PROG) $(OBJS)
|
||||||
|
|
||||||
|
clean:
|
||||||
|
$(RM) ./usb_modeswitch
|
@ -1,11 +0,0 @@
|
|||||||
diff -Nura usb_modeswitch-1.0.1/Makefile usb_modeswitch-1.0.1.nostrip/Makefile
|
|
||||||
--- usb_modeswitch-1.0.1/Makefile 2009-04-15 16:15:17.000000000 -0300
|
|
||||||
+++ usb_modeswitch-1.0.1.nostrip/Makefile 2009-06-10 10:02:05.000000000 -0300
|
|
||||||
@@ -13,7 +13,6 @@
|
|
||||||
all: $(PROG)
|
|
||||||
$(PROG): $(OBJS)
|
|
||||||
$(CC) $(CCFLAGS) -o $(PROG) $(OBJS)
|
|
||||||
- $(STRIP) $(PROG)
|
|
||||||
|
|
||||||
clean:
|
|
||||||
$(RM) ./usb_modeswitch
|
|
@ -7,22 +7,20 @@
|
|||||||
USB_MODESWITCH_VERSION = 1.0.7
|
USB_MODESWITCH_VERSION = 1.0.7
|
||||||
USB_MODESWITCH_SOURCE = usb_modeswitch-$(USB_MODESWITCH_VERSION).tar.bz2
|
USB_MODESWITCH_SOURCE = usb_modeswitch-$(USB_MODESWITCH_VERSION).tar.bz2
|
||||||
USB_MODESWITCH_SITE = http://www.draisberghof.de/usb_modeswitch
|
USB_MODESWITCH_SITE = http://www.draisberghof.de/usb_modeswitch
|
||||||
USB_MODESWITCH_INSTALL_TARGET_OPT = DESTDIR=$(TARGET_DIR) install
|
|
||||||
USB_MODESWITCH_DEPENDENCIES = libusb-compat
|
USB_MODESWITCH_DEPENDENCIES = libusb-compat
|
||||||
USB_MODESWITCH_MAKE_OPT = CC="$(TARGET_CC)" OPTS="$(TARGET_CFLAGS)"
|
|
||||||
|
|
||||||
$(eval $(call AUTOTARGETS,package,usb_modeswitch))
|
define USB_MODESWITCH_BUILD_CMDS
|
||||||
|
rm $(@D)/usb_modeswitch
|
||||||
|
$(TARGET_CONFIGURE_OPTS) $(TARGET_MAKE_ENV) $(MAKE) -C $(@D)
|
||||||
|
endef
|
||||||
|
|
||||||
$(USB_MODESWITCH_TARGET_CONFIGURE):
|
define USB_MODESWITCH_INSTALL_TARGET_CMDS
|
||||||
rm -f $(USB_MODESWITCH_DIR)/usb_modeswitch
|
$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) DESTDIR=$(TARGET_DIR) install
|
||||||
touch $@
|
endef
|
||||||
|
|
||||||
$(USB_MODESWITCH_HOOK_POST_INSTALL):
|
define USB_MODESWITCH_CLEAN_CMDS
|
||||||
chmod a-x $(TARGET_DIR)/etc/usb_modeswitch.conf
|
rm -f $(TARGET_DIR)/usr/sbin/usb_modeswitch
|
||||||
touch $@
|
rm -f $(TARGET_DIR)/etc/usb_modeswitch.conf
|
||||||
|
endef
|
||||||
|
|
||||||
$(USB_MODESWITCH_TARGET_UNINSTALL):
|
$(eval $(call GENTARGETS,package,usb_modeswitch))
|
||||||
$(call MESSAGE,"Uninstalling")
|
|
||||||
rm -f $(TARGET_DIR)/usr/sbin/usb_modeswitch
|
|
||||||
rm -f $(TARGET_DIR)/etc/usb_modeswitch.conf
|
|
||||||
rm -f $(USB_MODESWITCH_TARGET_INSTALL_TARGET) $(USB_MODESWITCH_HOOK_POST_INSTALL)
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user