From patchwork Fri Sep 21 22:28:35 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Samuel Martin X-Patchwork-Id: 185966 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from silver.osuosl.org (silver.osuosl.org [140.211.166.136]) by ozlabs.org (Postfix) with ESMTP id D284F2C007D for ; Sat, 22 Sep 2012 08:29:47 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id A529530E7D; Fri, 21 Sep 2012 22:29:46 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 2OkZGWXvoAR3; Fri, 21 Sep 2012 22:29:40 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by silver.osuosl.org (Postfix) with ESMTP id 563EC30E7B; Fri, 21 Sep 2012 22:29:28 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (whitealder.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id 8BA208F74A for ; Fri, 21 Sep 2012 22:29:09 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id D2E4684331 for ; Fri, 21 Sep 2012 22:29:07 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id G5On3tDAXc2f for ; Fri, 21 Sep 2012 22:29:04 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wi0-f175.google.com (mail-wi0-f175.google.com [209.85.212.175]) by whitealder.osuosl.org (Postfix) with ESMTPS id EC80A80BFC for ; Fri, 21 Sep 2012 22:29:03 +0000 (UTC) Received: by wibhm2 with SMTP id hm2so1995431wib.10 for ; Fri, 21 Sep 2012 15:29:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; bh=MXC+ZaMu+DxTaMPj/KKTtEuLKqmgUhBuz5ueBkClEAY=; b=bpFuLp00cRwdJIbDakCM8jx2IfLHUM2qYVKGFDCJyfwZpxGDQPve4WRCovl9g6aSe2 eN3hHb7CUm4oqCPN+jEQVQeabaq3ltg3wngcGQhK9GJI3/bNKjDBchEh5GvUg7GzzpZx XeJhBL7rSZnomD+sw46gEzDm69fXn+6hNCHULipCn8rXF9mEcattJAOzXlKONkbi/aVq phs9qWgBIonsSgLW6qJUl1UYdm+Aijify41adUbwjM6dl4pZELr9AEhfBNVIiVLYGiWZ gB+9XhHOUN144W6TCKWEWyq0a5yppR+EcUgK1f0Xah07j0DnZShN14T+tm9WFyJdiQEM pvbQ== Received: by 10.180.86.106 with SMTP id o10mr530828wiz.22.1348266541832; Fri, 21 Sep 2012 15:29:01 -0700 (PDT) Received: from localhost.localdomain (ivr94-4-82-229-165-48.fbx.proxad.net. [82.229.165.48]) by mx.google.com with ESMTPS id fb20sm346407wid.1.2012.09.21.15.29.00 (version=SSLv3 cipher=OTHER); Fri, 21 Sep 2012 15:29:01 -0700 (PDT) From: Samuel Martin To: buildroot@busybox.net Date: Sat, 22 Sep 2012 00:28:35 +0200 Message-Id: <1348266518-27665-4-git-send-email-s.martin49@gmail.com> X-Mailer: git-send-email 1.7.12.1 In-Reply-To: <1348266518-27665-1-git-send-email-s.martin49@gmail.com> References: <1348266518-27665-1-git-send-email-s.martin49@gmail.com> Subject: [Buildroot] [PATCH 3/6] ttcp: convert to generic-package infrastructure X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: buildroot-bounces@busybox.net Signed-off-by: Samuel Martin diff --git a/package/ttcp/ttcp.mk b/package/ttcp/ttcp.mk index 080286b..894b0cb 100644 --- a/package/ttcp/ttcp.mk +++ b/package/ttcp/ttcp.mk @@ -4,47 +4,25 @@ # ############################################################# # -TTCP_VERSION:= -TTCP_SOURCE_URL=http://ftp.sunet.se/pub/network/monitoring/ttcp -TTCP_SOURCE=ttcp$(TTCP_VERSION).c -TTCP_DIR=$(BUILD_DIR)/ttcp$(TTCP_VERSION) +TTCP_VERSION = +TTCP_SITE = http://ftp.sunet.se/pub/network/monitoring/ttcp +TTCP_SOURCE = ttcp.c +TTCP_LICENSE = public domain -$(DL_DIR)/$(TTCP_SOURCE): - $(call DOWNLOAD,$(TTCP_SOURCE_URL)/$(TTCP_SOURCE)) +TTCP_BINARY = ttcp -$(TTCP_DIR)/.unpacked: $(DL_DIR)/$(TTCP_SOURCE) - -mkdir $(TTCP_DIR) - cp -af $(DL_DIR)/$(TTCP_SOURCE) $(TTCP_DIR) - support/scripts/apply-patches.sh $(TTCP_DIR) package/ttcp/ ttcp-\*.patch - touch $(TTCP_DIR)/.unpacked +define TTCP_EXTRACT_CMDS + cp -f -t $(@D) $(DL_DIR)/$(TTCP_SOURCE) +endef -$(TTCP_DIR)/.configured: $(TTCP_DIR)/.unpacked - touch $(TTCP_DIR)/.configured +define TTCP_BUILD_CMDS + $(TARGET_CC) $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) \ + -o $(TTCP_SRCDIR)/$(TTCP_BINARY) $(@D)/$(TTCP_SOURCE) +endef -$(TTCP_DIR)/ttcp: $(TTCP_DIR)/.configured - $(TARGET_CC) -O2 -o $(TTCP_DIR)/ttcp $(TTCP_DIR)/$(TTCP_SOURCE) +define TTCP_INSTALL_TARGET_CMDS + $(STRIPCMD) $(STRIP_STRIP_UNNEEDED) $(@D)/$(TTCP_BINARY) + $(INSTALL) -D -m 0755 $(@D)/$(TTCP_BINARY) $(TARGET_DIR)/usr/bin +endef -$(TARGET_DIR)/usr/bin/ttcp: $(TTCP_DIR)/ttcp - cp -af $(TTCP_DIR)/ttcp $(TARGET_DIR)/usr/bin/ - -ttcp-legal-info: - @$(call legal-warning-pkg,ttcp,legal-info not yet implemented) - -ttcp: $(TARGET_DIR)/usr/bin/ttcp - -ttcp-source: $(DL_DIR)/$(TTCP_SOURCE) - -ttcp-clean: - rm -f $(TTCP_DIR)/*.o $(TTCP_DIR)/ttcp - -ttcp-dirclean: - rm -rf $(TTCP_DIR) - -############################################################# -# -# Toplevel Makefile options -# -############################################################# -ifeq ($(BR2_PACKAGE_TTCP),y) -TARGETS+=ttcp -endif +$(eval $(generic-package))