From patchwork Sun Sep 7 20:27:42 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jean-Christophe Dubois X-Patchwork-Id: 386741 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from whitealder.osuosl.org (whitealder.osuosl.org [140.211.166.138]) by ozlabs.org (Postfix) with ESMTP id EEC04140092 for ; Mon, 8 Sep 2014 06:28:00 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 3AFC190DA8; Sun, 7 Sep 2014 20:28:00 +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 1Mw+rf01UFuP; Sun, 7 Sep 2014 20:27:59 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by whitealder.osuosl.org (Postfix) with ESMTP id D0BB290D73; Sun, 7 Sep 2014 20:27:58 +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 C66781C2BD1 for ; Sun, 7 Sep 2014 20:27:57 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id C0F9F90D73 for ; Sun, 7 Sep 2014 20:27:57 +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 wpnO9ydXa+ae for ; Sun, 7 Sep 2014 20:27:56 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from zose-mta03.web4all.fr (zose-mta03.web4all.fr [185.49.20.44]) by whitealder.osuosl.org (Postfix) with ESMTP id 917E990954 for ; Sun, 7 Sep 2014 20:27:56 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by zose-mta03.web4all.fr (Postfix) with ESMTP id C404343E14 for ; Sun, 7 Sep 2014 22:27:55 +0200 (CEST) Received: from zose-mta03.web4all.fr ([127.0.0.1]) by localhost (zose-mta03.web4all.fr [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id WyTfemBuGj0q; Sun, 7 Sep 2014 22:27:50 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by zose-mta03.web4all.fr (Postfix) with ESMTP id 7DC78442AD; Sun, 7 Sep 2014 22:27:50 +0200 (CEST) X-Virus-Scanned: amavisd-new at zose-mta-03.w4a.fr Received: from zose-mta03.web4all.fr ([127.0.0.1]) by localhost (zose-mta03.web4all.fr [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id 9dKz2KUuOxLc; Sun, 7 Sep 2014 22:27:50 +0200 (CEST) Received: from localhost.localdomain (smm49-1-78-235-240-156.fbx.proxad.net [78.235.240.156]) by zose-mta03.web4all.fr (Postfix) with ESMTPSA id 2FF4643E14; Sun, 7 Sep 2014 22:27:50 +0200 (CEST) From: Jean-Christophe DUBOIS To: buildroot@busybox.net Date: Sun, 7 Sep 2014 22:27:42 +0200 Message-Id: <1410121662-23096-1-git-send-email-jcd@tribudubois.net> X-Mailer: git-send-email 1.9.1 Subject: [Buildroot] [PATCH v8] bcache-tools: Adding package. 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 This is the bcache tools, required to setup the linux bcache feature of the Linux kernel. Signed-off-by: Jean-Christophe DUBOIS Reviewed-by: "Yann E. MORIN" --- Changes v1 to v2 * Remove 'support' word from comment statement in Config.in. * Use github helper to get the project site instead of hardcoded URL. Changes v2 to v3 * Added bcache-tools description in Config help. * Added bcache-tools URL in Config help. * Added BR2_LARGEFILE BR2_USE_WCHAR and BR2_USE_MMU dependencies in Config. * Added BR2_PACKAGE_UTIL_LINUX selection in Config. * Added new requirements in Config comment. * Use POST_EXTRACT_HOOKS to modify Makefile. * Pass $(TARGET_CONFIGURE_OPTS) in env variables to $(MAKE). * Create man8 dir as part of PRE_INSTALL_TARGET_HOOKS. Changes v3 to v4 * Move from .zip file to .tar.gz as download file in .mk file. * Use complete git tag as version in .mk file. * Remove explicit extract rule from .mk file (use implicite rule). Changes v4 to v5 * Remove explicit package name in .mk (rely on default behavior). Changes v5 to v6 * Switch spaces to tabs in Config.in * Don't patch Makefile for pkg-config in .mk file. Changes v6 to v7 * change eudev dependency to udev dependency in Makefile. Changes v7 to v8 * remove makefile dependency on udev * install /lib/udev/rules.d directory in PRE_INSTALL_TARGET_HOOKS --- package/Config.in | 1 + package/bcache-tools/Config.in | 22 +++++++++++++++++++++ package/bcache-tools/bcache-tools.mk | 37 ++++++++++++++++++++++++++++++++++++ 3 files changed, 60 insertions(+) create mode 100644 package/bcache-tools/Config.in create mode 100644 package/bcache-tools/bcache-tools.mk diff --git a/package/Config.in b/package/Config.in index 883dd66..ef0a22a 100644 --- a/package/Config.in +++ b/package/Config.in @@ -280,6 +280,7 @@ endmenu source "package/a10disp/Config.in" source "package/acpid/Config.in" source "package/avrdude/Config.in" + source "package/bcache-tools/Config.in" source "package/cdrkit/Config.in" source "package/cryptsetup/Config.in" source "package/cwiid/Config.in" diff --git a/package/bcache-tools/Config.in b/package/bcache-tools/Config.in new file mode 100644 index 0000000..a3f7897 --- /dev/null +++ b/package/bcache-tools/Config.in @@ -0,0 +1,22 @@ +config BR2_PACKAGE_BCACHE_TOOLS + bool "bcache tools" + depends on BR2_PACKAGE_HAS_UDEV + depends on BR2_LARGEFILE # util-linux + depends on BR2_USE_WCHAR # util-linux + depends on BR2_USE_MMU # util-linux (libblkid) + select BR2_PACKAGE_UTIL_LINUX + select BR2_PACKAGE_UTIL_LINUX_LIBUUID + select BR2_PACKAGE_UTIL_LINUX_LIBBLKID + help + Bcache is a Linux kernel block layer cache. It allows one or + more fast disk drives such as flash-based solid state drives (SSDs) + to act as a cache for one or more slower hard disk drives. + + http://bcache.evilpiepirate.org/ + + This is the user space bcache tools, required to setup the linux + bcache feature of the Linux kernel. + +comment "bcache-tools needs udev /dev management and a toolchain w/ largefile, wchar" + depends on BR2_USE_MMU + depends on !BR2_PACKAGE_HAS_UDEV || !BR2_LARGEFILE || !BR2_USE_WCHAR diff --git a/package/bcache-tools/bcache-tools.mk b/package/bcache-tools/bcache-tools.mk new file mode 100644 index 0000000..e537471 --- /dev/null +++ b/package/bcache-tools/bcache-tools.mk @@ -0,0 +1,37 @@ +################################################################################ +# +# bcache-tools +# +################################################################################ + +BCACHE_TOOLS_VERSION = v1.0.7 +BCACHE_TOOLS_SITE = $(call github,g2p,bcache-tools,$(BCACHE_TOOLS_VERSION)) +BCACHE_TOOLS_LICENSE = GPLv2 +BCACHE_TOOLS_LICENSE_FILES = COPYING +BCACHE_TOOLS_DEPENDENCIES = host-pkgconf util-linux + +# We pass $(TARGET_CONFIGURE_OPTS) as environment variable to allow +# the bcache-tools Makefile to alter CFLAGS +define BCACHE_TOOLS_BUILD_CMDS + $(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D) +endef + +# The bcache-tools Makefile expects the man8 directory to exist. +define BCACHE_TOOLS_INSTALL_MAN8 + $(INSTALL) -m 0755 -d $(TARGET_DIR)/usr/share/man/man8 +endef + +# The bcache-tools Makefile expects the /lib/udev/rules.d directory to exist. +define BCACHE_TOOLS_INSTALL_UDEV + $(INSTALL) -m 0755 -d $(TARGET_DIR)/lib/udev/rules.d +endef + +BCACHE_TOOLS_PRE_INSTALL_TARGET_HOOKS += BCACHE_TOOLS_INSTALL_MAN8 +BCACHE_TOOLS_PRE_INSTALL_TARGET_HOOKS += BCACHE_TOOLS_INSTALL_UDEV + +define BCACHE_TOOLS_INSTALL_TARGET_CMDS + $(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D) \ + DESTDIR=$(TARGET_DIR) install +endef + +$(eval $(generic-package))