Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: J.C. Woltz <jwoltz@gmail.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH v5 1/2] usb_modeswitch: update to 1.2.3
Date: Sun, 19 Feb 2012 12:49:53 -0500	[thread overview]
Message-ID: <1329673794-17158-2-git-send-email-jwoltz@gmail.com> (raw)
In-Reply-To: <1329673794-17158-1-git-send-email-jwoltz@gmail.com>

This patch updates usb_modeswitch to version 1.2.3.
The usb_modeswitch.mk needed to be modified for usb_modeswitch to compile.
Also added extra remove section for the added help scripts and files.

Signed-off-by: J.C. Woltz <jwoltz@gmail.com>
Acked-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
---
replace TARGET_MAKE_ENV and add USB_MODESWITCH_UNINSTALL_CMDS
as recommended by Arnout Vandecappelle

Other version information has been lost

version 5:
added explanation to patch
 .../usb_modeswitch/usb_modeswitch-makefile.patch   |   43 ++++++++++----------
 package/usb_modeswitch/usb_modeswitch.mk           |   20 ++++++---
 2 files changed, 35 insertions(+), 28 deletions(-)

diff --git a/package/usb_modeswitch/usb_modeswitch-makefile.patch b/package/usb_modeswitch/usb_modeswitch-makefile.patch
index 918200b..55b0b3d 100644
--- a/package/usb_modeswitch/usb_modeswitch-makefile.patch
+++ b/package/usb_modeswitch/usb_modeswitch-makefile.patch
@@ -1,23 +1,24 @@
-diff -Nura usb-modeswitch-1.1.2.orig/Makefile usb-modeswitch-1.1.2/Makefile
---- usb-modeswitch-1.1.2.orig/Makefile	2010-04-17 15:27:11.000000000 -0300
-+++ usb-modeswitch-1.1.2/Makefile	2010-04-22 15:05:32.363471807 -0300
-@@ -1,6 +1,6 @@
- PROG        = usb_modeswitch
- VERS        = 1.1.2
--CC          = gcc
-+CC          ?= gcc
- CFLAGS      += -Wall -l usb
- RM          = /bin/rm -f
- OBJS        = usb_modeswitch.c
-@@ -23,8 +23,9 @@
- install: all
- 	install -d $(SBINDIR)
- 	install --mode=755 usb_modeswitch $(SBINDIR)/usb_modeswitch
--	install --mode=755 usb_modeswitch.tcl $(UDEVDIR)/usb_modeswitch
--	install --mode=644 usb_modeswitch.conf $(ETCDIR)/usb_modeswitch.conf
-+	#install --mode=755 usb_modeswitch.tcl $(UDEVDIR)/usb_modeswitch
-+	#install --mode=644 usb_modeswitch.conf $(ETCDIR)/usb_modeswitch.conf
-+	install -d $(MANDIR)
- 	install --mode=644 usb_modeswitch.1 $(MANDIR)/usb_modeswitch.1
+Removed the -s from the install command. Without this, usb_modeswitch woulc
+fail to install. 
+
+Signed-off-by: J.C. Woltz <jwoltz@gmail.com>
+--- usb_modeswitch-1.2.3.orig/Makefile.orig	2012-02-06 14:00:15.000000000 -0500
++++ usb_modeswitch-1.2.3/Makefile	2012-02-06 14:01:13.000000000 -0500
+@@ -46,7 +46,7 @@
+ 	cd jim && $(MAKE) distclean
  
+ install-common:
+-	install -D -s --mode=755 usb_modeswitch $(SBINDIR)/usb_modeswitch
++	install -D --mode=755 usb_modeswitch $(SBINDIR)/usb_modeswitch
+ 	install -D --mode=755 usb_modeswitch.sh $(UDEVDIR)/usb_modeswitch
+ 	install -D --mode=644 usb_modeswitch.conf $(ETCDIR)/usb_modeswitch.conf
+ 	install -D --mode=644 usb_modeswitch.1 $(MANDIR)/usb_modeswitch.1
+@@ -65,7 +65,7 @@
+ 	install -D --mode=755 usb_modeswitch_dispatcher $(SBINDIR)/usb_modeswitch_dispatcher
+ 
+ install-binary:
+-	install -D -s --mode=755 usb_modeswitch_dispatcher $(SBINDIR)/usb_modeswitch_dispatcher
++	install -D --mode=755 usb_modeswitch_dispatcher $(SBINDIR)/usb_modeswitch_dispatcher
+ 
+ install: all install-common install-script
  
diff --git a/package/usb_modeswitch/usb_modeswitch.mk b/package/usb_modeswitch/usb_modeswitch.mk
index 7b982d8..c8b24db 100644
--- a/package/usb_modeswitch/usb_modeswitch.mk
+++ b/package/usb_modeswitch/usb_modeswitch.mk
@@ -4,25 +4,31 @@
 #
 #############################################################
 
-USB_MODESWITCH_VERSION = 1.1.2
+USB_MODESWITCH_VERSION = 1.2.3
 USB_MODESWITCH_SOURCE = usb-modeswitch-$(USB_MODESWITCH_VERSION).tar.bz2
 USB_MODESWITCH_SITE = http://www.draisberghof.de/usb_modeswitch
 USB_MODESWITCH_DEPENDENCIES = libusb-compat
 
 define USB_MODESWITCH_BUILD_CMDS
-	$(TARGET_CONFIGURE_OPTS) $(TARGET_MAKE_ENV) $(MAKE) -C $(@D)
+	$(TARGET_MAKE_ENV) $(MAKE) CC="$(TARGET_CC)" LD="$(TARGET_LD)" -C $(@D)
 endef
 
 define USB_MODESWITCH_INSTALL_TARGET_CMDS
 	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) DESTDIR=$(TARGET_DIR) install
-	$(INSTALL) -D $(@D)/usb_modeswitch.setup -m 0644 \
-		$(TARGET_DIR)/etc/usb_modeswitch.setup
 endef
 
+
 define USB_MODESWITCH_CLEAN_CMDS
-	rm -f $(TARGET_DIR)/usr/sbin/usb_modeswitch
-	rm -f $(TARGET_DIR)/etc/usb_modeswitch.setup
-	rm -f $(TARGET_DIR)/usr/share/man/man1/usb_modeswitch.1
+	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) DESTDIR=$(TARGET_DIR) clean
+endef
+
+define USB_MODESWITCH_UNINSTALL_CMDS
+	$(RM) -f $(TARGET_DIR)/usr/sbin/usb_modeswitch
+	$(RM) -f $(TARGET_DIR)/lib/udev/usb_modeswitch
+	$(RM) -f $(TARGET_DIR)/etc/usb_modeswitch.setup
+	$(RM) -f $(TARGET_DIR)/usr/share/man/man1/usb_modeswitch.1
+	$(RM) -rf $(TARGET_DIR)/var/lib/usb_modeswitch
+	$(RM) -f $(TARGET_DIR)/usr/sbin/usb_modeswitch_dispatcher
 endef
 
 $(eval $(call GENTARGETS))
-- 
1.7.5.4

  reply	other threads:[~2012-02-19 17:49 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-19 17:49 [Buildroot] [PATCH v5 0/2] usb_modeswitch update and add data J.C. Woltz
2012-02-19 17:49 ` J.C. Woltz [this message]
2012-02-19 17:49 ` [Buildroot] [PATCH v5 2/2] new program: usb_modeswitch_data J.C. Woltz
  -- strict thread matches above, loose matches on Subject: below --
2012-03-18  1:30 [Buildroot] [PATCH v5 0/2] usb_modeswitch update and add data J.C. Woltz
2012-03-18  1:30 ` [Buildroot] [PATCH v5 1/2] usb_modeswitch: update to 1.2.3 J.C. Woltz
2012-07-15 21:12   ` Thomas Petazzoni
2012-07-21 18:01     ` J.C. Woltz
2012-07-24 22:20       ` Arnout Vandecappelle

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1329673794-17158-2-git-send-email-jwoltz@gmail.com \
    --to=jwoltz@gmail.com \
    --cc=buildroot@busybox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox