From patchwork Mon Oct 23 16:40:13 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Angelo Compagnucci X-Patchwork-Id: 829417 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="EbH4YCeH"; 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 3yLMb81CLfz9t2l for ; Tue, 24 Oct 2017 03:40:36 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id EB71D86A8C; Mon, 23 Oct 2017 16:40:31 +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 Xoww8CJpXtkr; Mon, 23 Oct 2017 16:40:30 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by fraxinus.osuosl.org (Postfix) with ESMTP id 0C9C386AA4; Mon, 23 Oct 2017 16:40:29 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by ash.osuosl.org (Postfix) with ESMTP id 9D1B11BFB70 for ; Mon, 23 Oct 2017 16:40:25 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 97196869FF for ; Mon, 23 Oct 2017 16:40:25 +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 zeLjImT_M5-i for ; Mon, 23 Oct 2017 16:40:25 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wm0-f66.google.com (mail-wm0-f66.google.com [74.125.82.66]) by fraxinus.osuosl.org (Postfix) with ESMTPS id F0929866A6 for ; Mon, 23 Oct 2017 16:40:24 +0000 (UTC) Received: by mail-wm0-f66.google.com with SMTP id z3so4073787wme.5 for ; Mon, 23 Oct 2017 09:40:24 -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=s51PPjhKKRDbmrQNcVO7GX5EnWvdvo4RsHfbuWfg/MA=; b=EbH4YCeH22Aljn+bSf/6K75D33GYL9fzPBoIj+ICIdcfdVnTa7VcOjRdyRt126hrGI zrqzqHbH65Rex2c0d2/ODBRfTDZ31pqn5RYb8BhCjvP3RjNMklBNN8cL93IdARCLgcnc 2BqaxV0xjAG3/KxYUyT6mn+Y1n1PIUT2ew29fUn7PTIF4aIQOcfKpaElw5mHFRopAjab 2qW6Xjg3LWlXrlckszklg4rq1leSP4ANu0J/4wPwFm0MSBv3GFTzuG2pil9U0Lypa8pi LgBCTpd15730PVS7RT2z7j2NKWbSmcKjnFLkGu2sCORrZ+u9Ea87QqedhSZ4qNy4a2Pt prMQ== 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=s51PPjhKKRDbmrQNcVO7GX5EnWvdvo4RsHfbuWfg/MA=; b=MzeDg9ti8ENULNLnyb6wfGXX1KWcYqXpvgZRlIyfPfW0aMb8Q9G9Q3wyvJJAos9uNA 9DXlcVjldU671zHz8kEV4OaRXStx3q9SaDYP0v9jxNBoKuZL9y/okC62zpkxzBOJzVMr 6eT5hxnW6y4A9VkdQ0lh9CpZI6+v1bNQlZSpo03wFHOshri1ZZhWUg/yVeWJAOSEvs9z RkT3IdG0VYIHBWmnRPVfo59unAnpBh+GHngfuzJ6NUJIigh2QTMTd4IjUKG6nMkTp/2U oOffKKCnsjaGWY7AZ2kybEif2w7hQOyIC0nU2JpDjrzgwEzyairxrvWeE5EBr0JNVbTr uDFg== X-Gm-Message-State: AMCzsaV/kwdYVdOfV5dcLcuolt4pPtLq6u4yAHElgIERVoC7vFCRAmMi ywZGUQKkokrxX3lDyKuIMlyiT5J7 X-Google-Smtp-Source: ABhQp+T44c/X9YpUB6Irt3kKw9hOBlLOjpdc2AZgf6RVPd8JS3/OkNweNITh5ctsNXMVb9JSiTv0bw== X-Received: by 10.28.154.137 with SMTP id c131mr6596397wme.142.1508776822993; Mon, 23 Oct 2017 09:40:22 -0700 (PDT) Received: from localhost.localdomain ([89.202.204.147]) by smtp.gmail.com with ESMTPSA id w5sm5222450wrg.65.2017.10.23.09.40.21 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 23 Oct 2017 09:40:22 -0700 (PDT) From: Angelo Compagnucci To: buildroot@buildroot.org Date: Mon, 23 Oct 2017 18:40:13 +0200 Message-Id: <1508776814-18723-3-git-send-email-angelo.compagnucci@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1508776814-18723-1-git-send-email-angelo.compagnucci@gmail.com> References: <1508776814-18723-1-git-send-email-angelo.compagnucci@gmail.com> Subject: [Buildroot] [RFC v3 3/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 | 32 ++++---------------------------- 1 file changed, 4 insertions(+), 28 deletions(-) diff --git a/package/flannel/flannel.mk b/package/flannel/flannel.mk index bbb2c72..6c9d9dd 100644 --- a/package/flannel/flannel.mk +++ b/package/flannel/flannel.mk @@ -11,36 +11,12 @@ 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) - -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_GO_LDFLAGS = -X github.com/coreos/flannel/version.Version=$(FLANNEL_VERSION) +# 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_BINDIR)/flannel $(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))