From patchwork Tue Oct 24 21:14:31 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Angelo Compagnucci X-Patchwork-Id: 830041 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.133; helo=hemlock.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="ZrfRO4rC"; dkim-atps=neutral Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3yM5dC5rphz9t2c for ; Wed, 25 Oct 2017 08:14:55 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id F2004898A3; Tue, 24 Oct 2017 21:14:51 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id LrYWoRqPfSXp; Tue, 24 Oct 2017 21:14:50 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id DA69989869; Tue, 24 Oct 2017 21:14:49 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id 4F8151BF25F for ; Tue, 24 Oct 2017 21:14:46 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 44E3988AA6 for ; Tue, 24 Oct 2017 21:14:46 +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 Y5P+X8YQU0yw for ; Tue, 24 Oct 2017 21:14:44 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wr0-f194.google.com (mail-wr0-f194.google.com [209.85.128.194]) by whitealder.osuosl.org (Postfix) with ESMTPS id 8256088A96 for ; Tue, 24 Oct 2017 21:14:44 +0000 (UTC) Received: by mail-wr0-f194.google.com with SMTP id y9so9787384wrb.2 for ; Tue, 24 Oct 2017 14:14:44 -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=ZrfRO4rCBc3pfXg1fNYe3Ra6HwMD0lCVfmQQ9hR4+ahezZa02kutoYuidSuCi8bEcD 8LEQnBCNlS7rxJhsPxMvhHn5Px+PKooTd5f4CjR8llRvsx1aNt/qfTO7OpzFKixC6y8r XJxQaNRBTomXsfAwKUqhKhgVKl0BT1w/jtmo7SC2DoMbAwj8CyT8487sx9PRAfw8e6/A XzNqaBfkGeyK9Otya0sqs5JS6G1Gi+ji2YWf/MengtKX3Sd4B3CXzIs5uT50jP6cNC/a OcHcIHI6EhbgvzYEAA+PoTIUGefUkqK4GbgkgJZpHiN0Q402L8L6SlMi/TjBee1qoCyf lVWw== 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=iYldHh8lbodsDleM8S3q9qzZNK4Qj89AO8GR9eUHZpn892ZmUllxueg9GAPiAlhiTb en06ogNn63s/kO3KfRH+Wa6OvSAy3T3axd4Qx6NLbIZXJ5ybN2VVH1FaiLp0YWKo/u8N y6pRKM+clo7DRPO+tbXGuyXUIXueMoiiAd/ekExPZ5lnm/fqygq0Z4SA+kVlHanFC6u7 mMbJMc+3oP0qlbiKtFabjMqwOQD+sIx8qd8TxWn71q8cR1984kpbHadSM4yPDqt+WNVD WoucA/FOdgFZ9XehzhDNbR1n9T/SaZ2rUrz9/AKfxQjfZeF7Zx/muJCvVuV+j2ZaOFpL segw== X-Gm-Message-State: AMCzsaWCCUOGNerWjAW6Y3PGHi8wCBv6bjZmJUAhFYfRW6VzDGLYK4zf nqR34mGPZBV8Fe8euLQvAE7OCY2a X-Google-Smtp-Source: ABhQp+RN/NreCW+8388AlgIZmdYPXCLhSswThf8w7DrK6fpJFOmKDRcT7ay3yGQkPQKp4v9gFIuwDQ== X-Received: by 10.223.132.135 with SMTP id 7mr10150wrg.74.1508879682528; Tue, 24 Oct 2017 14:14:42 -0700 (PDT) Received: from localhost.localdomain ([89.202.204.147]) by smtp.gmail.com with ESMTPSA id k105sm1240527wrc.90.2017.10.24.14.14.40 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 24 Oct 2017 14:14:41 -0700 (PDT) From: Angelo Compagnucci To: buildroot@buildroot.org Date: Tue, 24 Oct 2017 23:14:31 +0200 Message-Id: <1508879672-12957-3-git-send-email-angelo.compagnucci@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1508879672-12957-1-git-send-email-angelo.compagnucci@gmail.com> References: <1508879672-12957-1-git-send-email-angelo.compagnucci@gmail.com> Cc: christian@paral.in Subject: [Buildroot] [RFC v4 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))