From: Yann E. MORIN <yann.morin.1998@free.fr>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH v2] bcache-tools: Adding package.
Date: Sun, 3 Aug 2014 20:53:40 +0200 [thread overview]
Message-ID: <20140803185340.GI4052@free.fr> (raw)
In-Reply-To: <1406839219-10929-1-git-send-email-jcd@tribudubois.net>
Jean-Christophe, All,
On 2014-07-31 22:40 +0200, Jean-Christophe DUBOIS spake thusly:
> This patch adds the bcache-tools package to buildroot.
This line above is not needed: it is obvious this is adding the package
to Buildroot! ;-)
> This is the bcache tools, required to setup the linux bcache
> feature of the Linux kernel.
>
> Signed-off-by: Jean-Christophe DUBOIS <jcd@tribudubois.net>
> ---
> diff --git a/package/bcache-tools/Config.in b/package/bcache-tools/Config.in
> new file mode 100644
> index 0000000..fbe4158
> --- /dev/null
> +++ b/package/bcache-tools/Config.in
> @@ -0,0 +1,11 @@
> +config BR2_PACKAGE_BCACHE_TOOLS
> + bool "bcache tools"
> + depends on BR2_PACKAGE_HAS_UDEV
> + select BR2_PACKAGE_UTIL_LINUX_LIBUUID
> + select BR2_PACKAGE_UTIL_LINUX_LIBBLKID
Since you select sub-options of util-linux, you must also select the
package itself:
select BR2_PACKAGE_UTIL_LINUX
But you must also inherit its dependencies:
depends on BR2_LARGEFILE # util-linux
depends on BR2_USE_WCHAR # util-linux
But you must also inherit from the sub-options' dependencies, too:
depends on BR2_USE_MMU # util-linux (libblkid)
> + help
> + This is the bcache tools, required to setup the linux bcache
> + feature of the Linux kernel.
> +
> +comment "bcache-tools needs udev /dev management"
> + depends on !BR2_PACKAGE_HAS_UDEV
And you must adapt the comment to the dependencies above, like:
bcache needs udev /dev management and a toolchain w/ largefile, wchar
> diff --git a/package/bcache-tools/bcache-tools.mk b/package/bcache-tools/bcache-tools.mk
> new file mode 100644
> index 0000000..8b0b061
> --- /dev/null
> +++ b/package/bcache-tools/bcache-tools.mk
> @@ -0,0 +1,34 @@
> +################################################################################
> +#
> +# bcache-tools
> +#
> +################################################################################
> +
> +BCACHE_TOOLS_VERSION = 1.0.7
> +BCACHE_TOOLS_SITE = $(call github,g2p,bcache-tools,v$(BCACHE_TOOLS_VERSION))
> +BCACHE_TOOLS_SOURCE = v$(BCACHE_TOOLS_VERSION).zip
> +BCACHE_TOOLS_LICENSE = GPLv2
> +BCACHE_TOOLS_LICENSE_FILES = COPYING
> +BCACHE_TOOLS_DEPENDENCIES = host-pkgconf util-linux eudev
> +BCACHE_TOOLS_MAKE_ENV = $(TARGET_MAKE_ENV) CC="$(TARGET_CC)"
> +
> +define BCACHE_TOOLS_EXTRACT_CMDS
> + unzip -d $(BUILD_DIR) $(DL_DIR)/$(BCACHE_TOOLS_SOURCE)
> +endef
> +
> +define BCACHE_TOOLS_FIX_PKGCONFIG
> + $(SED) 's^`pkg-config^`$(PKG_CONFIG_HOST_BINARY)^' \
> + $(BCACHE_TOOLS_DIR)/Makefile
> +endef
This should probably be a post-extract hook. See:
http://buildroot.net/downloads/manual/manual.html#hooks
> +define BCACHE_TOOLS_BUILD_CMDS
> + $(BCACHE_TOOLS_FIX_PKGCONFIG)
> + $(BCACHE_TOOLS_MAKE_ENV) $(MAKE) -C $(@D)
This should probably be:
$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) $(TARGET_CONFIGURE_OPTS)
TARGET_CONFIGURE_OPTS contains the CC= assignment.
Thus, the BCACHE_TOOLS_MAKE_ENV no longer makes sense, so you can remove
it.
> +endef
> +
> +define BCACHE_TOOLS_INSTALL_TARGET_CMDS
> + $(INSTALL) -m 0755 -d $(TARGET_DIR)/usr/share/man/man8
> + $(BCACHE_TOOLS_MAKE_ENV) $(MAKE) -C $(@D) DESTDIR=$(TARGET_DIR) install
Ditto:
$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) $(TARGET_CONFIGURE_OPTS) \
DESTDIR=$(TARGET_DIR) install
Regards,
Yann E. MORIN.
> +endef
> +
> +$(eval $(generic-package))
> --
> 1.9.1
>
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'
next prev parent reply other threads:[~2014-08-03 18:53 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-31 20:40 [Buildroot] [PATCH v2] bcache-tools: Adding package Jean-Christophe DUBOIS
2014-08-02 20:55 ` Jean-Christophe DUBOIS
2014-08-03 8:39 ` Yann E. MORIN
2014-08-03 18:53 ` Yann E. MORIN [this message]
2014-08-04 15:28 ` Jean-Christophe DUBOIS
2014-08-04 20:49 ` Yann E. MORIN
2014-08-04 19:53 ` Jean-Christophe DUBOIS
2014-08-04 21:00 ` Yann E. MORIN
2014-08-05 6:40 ` Jean-Christophe DUBOIS
2014-08-04 4:51 ` Thomas De Schampheleire
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20140803185340.GI4052@free.fr \
--to=yann.morin.1998@free.fr \
--cc=buildroot@busybox.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.