Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH v2] jsmn: new package
Date: Sat, 28 Jan 2017 23:06:32 +1300	[thread overview]
Message-ID: <20170128230632.71598265@free-electrons.com> (raw)
In-Reply-To: <1483441304-3789-1-git-send-email-david.bachelart@bbright.com>

Hello,

Thanks for this contribution! I applied, but after doing a number of
changes. See below.

On Tue,  3 Jan 2017 12:01:44 +0100, David Bachelart wrote:
> diff --git a/package/jsmn/Config.in b/package/jsmn/Config.in
> new file mode 100644
> index 0000000..23d20f5
> --- /dev/null
> +++ b/package/jsmn/Config.in
> @@ -0,0 +1,7 @@
> +config BR2_PACKAGE_JSMN
> +	bool "jsmn"
> +	help
> +	  jsmn (pronounced like 'jasmine') is a minimalistic JSON parser in C. It can 
> +	  be easily integrated into resource-limited or embedded projects.

Those lines were too long, so I rewrapped the Config.in help text.

> diff --git a/package/jsmn/jsmn.hash b/package/jsmn/jsmn.hash
> new file mode 100644
> index 0000000..5cc51c3
> --- /dev/null
> +++ b/package/jsmn/jsmn.hash
> @@ -0,0 +1,4 @@
> +# Locally computed
> +md5 78e2731c5697a3c35795b6350402e015    jsmn-6021415cc75e7922d45b12935f56348b064d8a7f.tar.gz
> +sha1    09b1a3493db6b1a77b03bc835aa9be6345db5269    jsmn-6021415cc75e7922d45b12935f56348b064d8a7f.tar.gz
> +sha256  e08993848b2abab62aa9572a560bb6e5ed4762f8537cd67c4de6cb17e17090a0    jsmn-6021415cc75e7922d45b12935f56348b064d8a7f.tar.gz

Having a sha256 is sufficient, we consider it a sufficiently strong
hash.

> +JSMN_VERSION = 6021415cc75e7922d45b12935f56348b064d8a7f
> +JSMN_SITE = $(call github,zserge,jsmn,$(JSMN_VERSION))
> +JSMN_LICENSE = BSD

This is wrong. First BSD is not a license, you must specify BSD-2c or
BSD-3c. But more importantly, the project is not under a BSD license,
it's under a MIT license.

> +JSMN_LICENSE_FILES = LICENSE
> +
> +JSMN_INSTALL_STAGING = YES
> +JSMN_INSTALL_TARGET = NO
> +
> +define JSMN_BUILD_CMDS
> +	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) \
> +		CC="$(TARGET_CC) $(TARGET_CFLAGS) $(TARGET_LDFLAGS)" \
> +		AR="$(TARGET_AR)"

Instead of passing CC and AR manually, I've used
$(TARGET_CONFIGURE_OPTS), which is shorter and better.

> +endef
> +
> +define JSMN_INSTALL_STAGING_CMDS
> +    $(INSTALL) -m 0644 $(@D)/libjsmn.a $(STAGING_DIR)/usr/lib/
> +    $(INSTALL) -m 0644 $(@D)/jsmn.h $(STAGING_DIR)/usr/include/

Indentation was wrong: you should use one tab to indent commands. And
the destination paths should be full paths, including the filename.

Thanks!

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com

      reply	other threads:[~2017-01-28 10:06 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-03 11:01 [Buildroot] [PATCH v2] jsmn: new package David Bachelart
2017-01-28 10:06 ` Thomas Petazzoni [this message]

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=20170128230632.71598265@free-electrons.com \
    --to=thomas.petazzoni@free-electrons.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox