All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Korsgaard <jacmet@uclibc.org>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 3/6] ttcp: convert to generic-package infrastructure
Date: Mon, 08 Oct 2012 23:09:55 +0200	[thread overview]
Message-ID: <87vcek1xi4.fsf@macbook.be.48ers.dk> (raw)
In-Reply-To: <1348266518-27665-4-git-send-email-s.martin49@gmail.com> (Samuel Martin's message of "Sat, 22 Sep 2012 00:28:35 +0200")

>>>>> "Samuel" == Samuel Martin <s.martin49@gmail.com> writes:

 Samuel> Signed-off-by: Samuel Martin <s.martin49@gmail.com>
 Samuel> diff --git a/package/ttcp/ttcp.mk b/package/ttcp/ttcp.mk
 Samuel> index 080286b..894b0cb 100644
 Samuel> --- a/package/ttcp/ttcp.mk
 Samuel> +++ b/package/ttcp/ttcp.mk
 Samuel> @@ -4,47 +4,25 @@
 Samuel>  #
 Samuel>  #############################################################
 Samuel>  #
 Samuel> -TTCP_VERSION:=
 Samuel> -TTCP_SOURCE_URL=http://ftp.sunet.se/pub/network/monitoring/ttcp
 Samuel> -TTCP_SOURCE=ttcp$(TTCP_VERSION).c
 Samuel> -TTCP_DIR=$(BUILD_DIR)/ttcp$(TTCP_VERSION)
 Samuel> +TTCP_VERSION =
 Samuel> +TTCP_SITE    = http://ftp.sunet.se/pub/network/monitoring/ttcp
 Samuel> +TTCP_SOURCE  = ttcp.c
 Samuel> +TTCP_LICENSE = public domain
 
 Samuel> -$(DL_DIR)/$(TTCP_SOURCE):
 Samuel> -	 $(call DOWNLOAD,$(TTCP_SOURCE_URL)/$(TTCP_SOURCE))
 Samuel> +TTCP_BINARY  = ttcp
 
 Samuel> -$(TTCP_DIR)/.unpacked: $(DL_DIR)/$(TTCP_SOURCE)
 Samuel> -	-mkdir $(TTCP_DIR)
 Samuel> -	cp -af $(DL_DIR)/$(TTCP_SOURCE) $(TTCP_DIR)
 Samuel> -	support/scripts/apply-patches.sh $(TTCP_DIR) package/ttcp/ ttcp-\*.patch
 Samuel> -	touch $(TTCP_DIR)/.unpacked
 Samuel> +define TTCP_EXTRACT_CMDS
 Samuel> +	cp -f -t $(@D) $(DL_DIR)/$(TTCP_SOURCE)
 Samuel> +endef
 
 Samuel> -$(TTCP_DIR)/.configured: $(TTCP_DIR)/.unpacked
 Samuel> -	touch $(TTCP_DIR)/.configured
 Samuel> +define TTCP_BUILD_CMDS
 Samuel> +	$(TARGET_CC) $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) \
 Samuel> +		-o $(TTCP_SRCDIR)/$(TTCP_BINARY) $(@D)/$(TTCP_SOURCE)

I prefer to use $(@D) both places for consistency.
 Samuel> +endef
 
 Samuel> -$(TTCP_DIR)/ttcp: $(TTCP_DIR)/.configured
 Samuel> -	$(TARGET_CC) -O2 -o $(TTCP_DIR)/ttcp $(TTCP_DIR)/$(TTCP_SOURCE)
 Samuel> +define TTCP_INSTALL_TARGET_CMDS
 Samuel> +	$(STRIPCMD) $(STRIP_STRIP_UNNEEDED) $(@D)/$(TTCP_BINARY)
 Samuel> +	$(INSTALL) -D -m 0755 $(@D)/$(TTCP_BINARY) $(TARGET_DIR)/usr/bin
 Samuel> +endef

You shouldn't do the explicit strip.

You have to provide the destination file name when using install -D.

Committed with those fixes, thanks.

-- 
Bye, Peter Korsgaard

  reply	other threads:[~2012-10-08 21:09 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-21 22:28 [Buildroot] [PATCH 0/6] Convert all remaining handwritten packages to gentarget infrastructure Samuel Martin
2012-09-21 22:28 ` [Buildroot] [PATCH 1/6] netkitbase: convert to the generic-package infrastructure Samuel Martin
2012-10-09  7:39   ` Peter Korsgaard
2012-09-21 22:28 ` [Buildroot] [PATCH 2/6] netkittelnet: convert to " Samuel Martin
2012-10-09  7:40   ` Peter Korsgaard
2012-09-21 22:28 ` [Buildroot] [PATCH 3/6] ttcp: " Samuel Martin
2012-10-08 21:09   ` Peter Korsgaard [this message]
2012-09-21 22:28 ` [Buildroot] [PATCH 4/6] newt: " Samuel Martin
2012-10-08 21:05   ` Peter Korsgaard
2012-09-21 22:28 ` [Buildroot] [PATCH 5/6] vpnc: " Samuel Martin
2012-10-08 21:14   ` Peter Korsgaard
2012-09-21 22:28 ` [Buildroot] [PATCH 6/6] manual: remove Manual Makefile section Samuel Martin
2012-10-21 19:40   ` Peter Korsgaard

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=87vcek1xi4.fsf@macbook.be.48ers.dk \
    --to=jacmet@uclibc.org \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.