From patchwork Mon Oct 16 17:08:48 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Angelo Compagnucci X-Patchwork-Id: 826434 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=busybox.net (client-ip=140.211.166.137; helo=fraxinus.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="Jp7IeWNk"; dkim-atps=neutral Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3yG4YT4Gcxz9sBZ for ; Tue, 17 Oct 2017 04:09:17 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 42E2C866C9; Mon, 16 Oct 2017 17:09:10 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Qr3ud7dnmawp; Mon, 16 Oct 2017 17:09:07 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by fraxinus.osuosl.org (Postfix) with ESMTP id A13E5866A6; Mon, 16 Oct 2017 17:09:06 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by ash.osuosl.org (Postfix) with ESMTP id 025691C3F97 for ; Mon, 16 Oct 2017 17:09:02 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id E736C2DF72 for ; Mon, 16 Oct 2017 17:09:01 +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 lGytpgPvmQwx for ; Mon, 16 Oct 2017 17:09:00 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wr0-f193.google.com (mail-wr0-f193.google.com [209.85.128.193]) by silver.osuosl.org (Postfix) with ESMTPS id 6CC5A2DE3D for ; Mon, 16 Oct 2017 17:09:00 +0000 (UTC) Received: by mail-wr0-f193.google.com with SMTP id l24so3636039wre.1 for ; Mon, 16 Oct 2017 10:09:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=pvhYTaxxPFg53+BjF+lVa8DV2TtVC7pA1SPKL6OXn0E=; b=Jp7IeWNkGgOkObQh4UIKRw09BIm3xfslyPbb6qIZ6qfdfwIVWJFSpXecRJsxBPBDwI imk2w7MPKlCdGvXU5FwZ+Wqpt+onj6grW4Jpe9C1Uh4mgV+q3Run4Tra0lVrwXcAOtTa RnD0EyHdmVHdrbHSGsqtHZyUjZYQv4OnF3FJL9TQB1jz4BIWAXs3DfgZyZBRI5jDaagP Yv1MeY8fOjG8gdtZkluHH2m9PhY9E34uA3Hbcfv+NcSJl7tURI4zhhzuBUHmIfE33Vq9 /ziuhvBrc0Aeb6EeUGLAmKlOwis2Y96lKKZEdgzMNWikpBzt+lOsipOO2cgC4SCm6L3B Cn5g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=pvhYTaxxPFg53+BjF+lVa8DV2TtVC7pA1SPKL6OXn0E=; b=crHZ1OutvnmNGRHP+j/32/O4kwB21u7+rRcfZAOjMuAgaRqAIueMcrhTtuBdRCFkLG hXrHbGSpo3tu332ixECrC7ZFExo2OzaNGLAxtz6pNjjCRSc/DXCQ8MccZPJPHereTHYu ry56bIxv5ywKE49SKE8xUdqt4TOvZIM5tjteLZ25B7irEvU7IezI9W4PYw/w8FHZmnFx Qwy6aVkiqZMg9hS3JPLq7cuIWaIACdjAq6SOTIKR3JxPKQHjbOZa04aZEZrRLqUgDsYY 3mtdPDbh0DfJSFgAY+auqdgUPQ+L8sT/RRHKI6ljBy9gs1zEZ4m/YoTYXkUVAMnCeFLV ruWQ== X-Gm-Message-State: AMCzsaXtCtc8chblX+YF48Q/214pgNyc/8IJtg+CQFhz1sueWrAjdDSg KMlXWO9GOzo8vdSdpZDWGQsPhqEB X-Google-Smtp-Source: ABhQp+TDLyH/1JK2UESVH6N/4LBCO2HF00xFqMQd+Do2rcXMNhaWysR89YDyLYLRQy/KOXI6m8+Uug== X-Received: by 10.223.177.139 with SMTP id q11mr1339066wra.77.1508173737813; Mon, 16 Oct 2017 10:08:57 -0700 (PDT) Received: from localhost.localdomain ([89.202.204.147]) by smtp.gmail.com with ESMTPSA id d195sm4539553wmd.0.2017.10.16.10.08.56 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 16 Oct 2017 10:08:56 -0700 (PDT) From: Angelo Compagnucci To: buildroot@buildroot.org Date: Mon, 16 Oct 2017 19:08:48 +0200 Message-Id: <1508173728-29181-4-git-send-email-angelo.compagnucci@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1508173728-29181-1-git-send-email-angelo.compagnucci@gmail.com> References: <1508173728-29181-1-git-send-email-angelo.compagnucci@gmail.com> Subject: [Buildroot] [RFC v2 4/4] package/flannel: converting to golang infrastructure X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.18-1 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" This patch converts the flannel package to the new golang infrastructure. Signed-off-by: Angelo Compagnucci --- package/flannel/flannel.mk | 25 ++++--------------------- 1 file changed, 4 insertions(+), 21 deletions(-) diff --git a/package/flannel/flannel.mk b/package/flannel/flannel.mk index bbb2c72..641bb97 100644 --- a/package/flannel/flannel.mk +++ b/package/flannel/flannel.mk @@ -11,14 +11,6 @@ FLANNEL_SOURCE = $(FLANNEL_VERSION).tar.gz FLANNEL_LICENSE = Apache-2.0 FLANNEL_LICENSE_FILES = LICENSE -FLANNEL_DEPENDENCIES = host-go - -FLANNEL_MAKE_ENV = \ - $(HOST_GO_TARGET_ENV) \ - GOBIN="$(@D)/bin" \ - GOPATH="$(@D)/gopath" \ - CGO_ENABLED=1 - FLANNEL_GLDFLAGS = \ -X github.com/coreos/flannel/version.Version=$(FLANNEL_VERSION) @@ -26,21 +18,12 @@ ifeq ($(BR2_STATIC_LIBS),y) FLANNEL_GLDFLAGS += -extldflags '-static' endif -define FLANNEL_CONFIGURE_CMDS - # Put sources at prescribed GOPATH location. - mkdir -p $(@D)/gopath/src/github.com/coreos - ln -s $(@D) $(@D)/gopath/src/github.com/coreos/flannel -endef - -define FLANNEL_BUILD_CMDS - cd $(@D) && $(FLANNEL_MAKE_ENV) $(HOST_DIR)/bin/go \ - build -v -o $(@D)/bin/flanneld -ldflags "$(FLANNEL_GLDFLAGS)" . -endef +FLANNEL_BUILD_OPTS = -ldflags "$(FLANNEL_GLDFLAGS)" +# Install flannel to its well known location. define FLANNEL_INSTALL_TARGET_CMDS - # Install flannel to its well known location. - $(INSTALL) -D -m 0755 $(@D)/bin/flanneld $(TARGET_DIR)/opt/bin/flanneld + $(INSTALL) -D -m 0755 $(FLANNEL_EXECUTABLE) $(TARGET_DIR)/opt/bin/flanneld $(INSTALL) -D -m 0755 $(@D)/dist/mk-docker-opts.sh $(TARGET_DIR)/opt/bin/mk-docker-opts.sh endef -$(eval $(generic-package)) +$(eval $(golang-package))