diff mbox

[1/1] ibrcommon: new package

Message ID 1439037734-10302-1-git-send-email-tom_a_sparks@yahoo.com.au
State Accepted
Headers show

Commit Message

Tom Sparks Aug. 8, 2015, 12:42 p.m. UTC
Signed-off-by: Tom Sparks <tom_a_sparks@yahoo.com.au>
---
 package/ibrcommon/Config.in    | 17 +++++++++++++++++
 package/ibrcommon/ibrcommon.mk | 30 ++++++++++++++++++++++++++++++
 2 files changed, 47 insertions(+)
 create mode 100644 package/ibrcommon/Config.in
 create mode 100644 package/ibrcommon/ibrcommon.mk

Comments

Thomas Petazzoni Aug. 29, 2015, 2:46 p.m. UTC | #1
Dear Tom Sparks,

On Sat,  8 Aug 2015 22:42:14 +1000, Tom Sparks wrote:
> Signed-off-by: Tom Sparks <tom_a_sparks@yahoo.com.au>
> ---
>  package/ibrcommon/Config.in    | 17 +++++++++++++++++
>  package/ibrcommon/ibrcommon.mk | 30 ++++++++++++++++++++++++++++++
>  2 files changed, 47 insertions(+)
>  create mode 100644 package/ibrcommon/Config.in
>  create mode 100644 package/ibrcommon/ibrcommon.mk

Thanks for your contribution! I applied your patch to the next branch
(so this patch will be part of the 2015.11 release in november, but
not of the upcoming 2015.08 release).

However, I had to do quite a few changes compared to your submission:

    [Thomas:
      - add package in package/Config.in, to make it visible in menuconfig
      - make the openssl, libnl and libxml2 dependencies optional, since
        they are definitely not mandatory
      - add README to the license files, since it contains useful
        licensing related information.
      - remove custom INSTALL_STAGING_OPTS and INSTALL_TARGET_OPTS since
        the package uses automake.
      - add missing final newline in Config.in and .mk file.]

You can look at the final commit at:

  http://git.buildroot.net/buildroot/commit/?h=next&id=d45e6bf09d0413742457b371762b09e69cf22829

and compare it to your original submission, to see the changes that
have been made. The most important issues were: 1/ that
package/ibrcommon/Config.in was not included in package/Config.in and
2/ that the openssl, libxml2 and libnl dependencies were optional not
mandatory.

Thanks!

Thomas
Thomas Petazzoni Aug. 29, 2015, 4:16 p.m. UTC | #2
Hello,

On Sat, 29 Aug 2015 16:46:58 +0200, Thomas Petazzoni wrote:

> However, I had to do quite a few changes compared to your submission:
> 
>     [Thomas:
>       - add package in package/Config.in, to make it visible in menuconfig
>       - make the openssl, libnl and libxml2 dependencies optional since
>         they are definitely not mandatory
>       - add README to the license files, since it contains useful
>         licensing related information.
>       - remove custom INSTALL_STAGING_OPTS and INSTALL_TARGET_OPTS since
>         the package uses automake.
>       - add missing final newline in Config.in and .mk file.]
> 
> You can look at the final commit at:
> 
>   http://git.buildroot.net/buildroot/commit/?h=next&id=d45e6bf09d0413742457b371762b09e69cf22829
> 
> and compare it to your original submission, to see the changes that
> have been made. The most important issues were: 1/ that
> package/ibrcommon/Config.in was not included in package/Config.in and
> 2/ that the openssl, libxml2 and libnl dependencies were optional not
> mandatory.

There were in fact two other issues, which I fixed in follow up commits:

 - The hash file was missing.

 - The "depends on" logic for the "comment" in the Config.in file was
   incorrect. The comment should be displayed either when thread
   support is not available *OR* when C++ support is not available.
   While in your implementation, the comment would only be shown if
   both are unavailable.

See:

   http://git.buildroot.net/buildroot/commit/?h=next&id=8bb79ac97d152a4e611357564eebf370e947a57e
   http://git.buildroot.net/buildroot/commit/?h=next&id=f1e2419753990744eb9d5d06e8661c9713d9a629

Best regards,

Thomas
diff mbox

Patch

diff --git a/package/ibrcommon/Config.in b/package/ibrcommon/Config.in
new file mode 100644
index 0000000..32b350d
--- /dev/null
+++ b/package/ibrcommon/Config.in
@@ -0,0 +1,17 @@ 
+config BR2_PACKAGE_IBRCOMMON
+	bool "ibrcommon"
+	depends on BR2_INSTALL_LIBSTDCPP
+	depends on BR2_TOOLCHAIN_HAS_THREADS
+	select BR2_PACKAGE_OPENSSL
+	select BR2_PACKAGE_LIBNL
+	select BR2_PACKAGE_LIBXML2
+	help
+	  IBR-DTN is a small dtn application that supports:
+	  Bundle Protocol RFC 5050
+	  Bundle Security Protocol RFC 6257
+
+	  http://trac.ibr.cs.tu-bs.de/project-cm-2012-ibrdtn
+
+comment "ibrcommon needs a toolchain w/ C++, threads"
+        depends on !BR2_INSTALL_LIBSTDCPP
+	depends on !BR2_TOOLCHAIN_HAS_THREADS
\ No newline at end of file
diff --git a/package/ibrcommon/ibrcommon.mk b/package/ibrcommon/ibrcommon.mk
new file mode 100644
index 0000000..b5af083
--- /dev/null
+++ b/package/ibrcommon/ibrcommon.mk
@@ -0,0 +1,30 @@ 
+################################################################################
+#
+# ibrcommon
+#
+################################################################################
+
+IBRCOMMON_VERSION = 1.0.1
+IBRCOMMON_SOURCE = ibrcommon-$(IBRCOMMON_VERSION).tar.gz
+IBRCOMMON_SITE = https://www.ibr.cs.tu-bs.de/projects/ibr-dtn/releases/
+IBRCOMMON_INSTALL_STAGING = YES
+IBRCOMMON_LICENSE = Apache-2.0
+IBRCOMMON_LICENSE_FILES = COPYING
+IBRCOMMON_CONF_OPTS = --with-openssl --with-lowpan --with-xml 
+IBRCOMMON_DEPENDENCIES = openssl libnl libxml2
+
+# While the configuration system uses autoconf, the Makefiles are
+# hand-written and do not use automake. Therefore, we have to hack
+# around their deficiencies by passing installation paths.
+IBRCOMMON_INSTALL_STAGING_OPTS = \
+	prefix=$(STAGING_DIR)/usr \
+	exec_prefix=$(STAGING_DIR)/usr \
+	PKG_DEVLIB_DIR=$(STAGING_DIR)/usr/lib \
+	install
+
+IBRCOMMON_INSTALL_TARGET_OPTS = \
+	prefix=$(TARGET_DIR)/usr \
+	exec_prefix=$(TARGET_DIR)/usr \
+	install
+
+$(eval $(autotools-package))
\ No newline at end of file