package: add ipcalc at version 1.0.0
PATCH 1/1 package: add ipcalc at version 1.0.0
ipcalc is an ancient and venerable tool for manipulating IP addresses, networks, & interfaces from shell scripts. There is a subtool in busybox, but it does not support everything the upstream tool [1] supports.
[1] https://gitlab.com/ipcalc/ipcalc
--- package/Config.in | 1 + package/ipcalc/0001-disable-man-build.patch | 33 +++++++++++++++++++++ package/ipcalc/Config.in | 7 +++++ package/ipcalc/ipcalc.hash | 3 ++ package/ipcalc/ipcalc.mk | 17 +++++++++++ 5 files changed, 61 insertions(+) create mode 100644 package/ipcalc/0001-disable-man-build.patch create mode 100644 package/ipcalc/Config.in create mode 100644 package/ipcalc/ipcalc.hash create mode 100644 package/ipcalc/ipcalc.mk
package/Config.in +1 -0
@@ -1702,6 +1702,7 @@ menu "Networking" source "package/gupnp-dlna/Config.in" source "package/ibrcommon/Config.in" source "package/ibrdtn/Config.in" + source "package/ipcalc/Config.in" source "package/libcgi/Config.in" source "package/libcgicc/Config.in" source "package/libcoap/Config.in"
package/ipcalc/0001-disable-man-build.patch new file +33 -0
@@ -0,0 +1,33 @@ +diff --git a/meson.build b/meson.build +index a2169fc..4ac9f46 100644 +--- a/meson.build ++++ b/meson.build +@@ -72,16 +72,17 @@ ipcalc = executable('ipcalc', + install : true + ) + +-ronn = find_program('ronn', required: true) +- +-ipcalc_1 = custom_target( +- 'ipcalc.1', +- output : 'ipcalc.1', +- input : 'ipcalc.1.md', +- command : [ronn, '--pipe', '-r', '@INPUT@'], +- capture: true, +- install_dir: join_paths(get_option('mandir'), 'man1'), +- install: true +-) ++ronn = find_program('ronn', required: false) ++if ronn.found() ++ ipcalc_1 = custom_target( ++ 'ipcalc.1', ++ output : 'ipcalc.1', ++ input : 'ipcalc.1.md', ++ command : [ronn, '--pipe', '-r', '@INPUT@'], ++ capture: true, ++ install_dir: join_paths(get_option('mandir'), 'man1'), ++ install: true ++ ) ++endif + + subdir('tests')
package/ipcalc/Config.in new file +7 -0
@@ -0,0 +1,7 @@ +config BR2_PACKAGE_IPCALC + bool "ipcalc" + help + A modern IPv4/IPv6 ipcalc tool, assisting in network calculations + in command line and as a tool for scripts. + + https://gitlab.com/ipcalc/ipcalc
package/ipcalc/ipcalc.hash new file +3 -0
@@ -0,0 +1,3 @@ +# Locally calculated +sha256 d7aca371335ab3e35364bcfe34cd0229db005be8bebb9236608ec318cb3f7748 ipcalc-1.0.0.tar.bz2 +sha256 8177f97513213526df2cf6184d8ff986c675afb514d4e68a404010521b880643 COPYING
package/ipcalc/ipcalc.mk new file +17 -0
@@ -0,0 +1,17 @@ +################################################################################ +# +# ipcalc +# +################################################################################ + +IPCALC_VERSION = 1.0.0 +IPCALC_SITE = https://gitlab.com/ipcalc/ipcalc/-/archive/$(IPCALC_VERSION) +IPCALC_SOURCE = ipcalc-$(IPCALC_VERSION).tar.bz2 +IPCALC_LICENSE = GPL-2.0+ +IPCALC_LICENSE_FILES = COPYING + +IPCALC_CONF_OPTS = \ + -Duse_maxminddb=disabled \ + -Duse_geoip=disabled + +$(eval $(meson-package))
Signature · 1 line
2.28.0
PATCH 1/1 package: add ipcalc at version 1.0.0
Hello Derrick,
Thanks for your contribution! It looks mostly good, I only have a few comments. First, the commit title we like to have for commits introducing new packages is just:
package/ipcalc: new package
See below for more comments.
Quoted 6 lines · On Wed, 14 Oct 2020 00:59:21 +0000 Derrick Lyndon Pallas <[email protected]>…
package/Config.in | 1 + package/ipcalc/0001-disable-man-build.patch | 33 +++++++++++++++++++++ package/ipcalc/Config.in | 7 +++++ package/ipcalc/ipcalc.hash | 3 ++ package/ipcalc/ipcalc.mk | 17 +++++++++++ 5 files changed, 61 insertions(+)
Could you add an entry in the DEVELOPERS file for this package?
package/Config.in menu "Networking" · line 1705
Quoted 9 lines
package/Config.in +1
-0@@ -1702,6 +1702,7 @@ menu "Networking" source "package/gupnp-dlna/Config.in" source "package/ibrcommon/Config.in" source "package/ibrdtn/Config.in" + source "package/ipcalc/Config.in"
It seems like you have added ipcalc under Libraries -> Networking, which I guess isn't really appropriate as it's not a library. Perhaps in "Networking applications" it would make more sense ?
package/ipcalc/0001-disable-man-build.patch
Quoted 5 lines
package/ipcalc/0001-disable-man-build.patch new file +0
-0
Could you rework this patch so that it has a proper description and Signed-off-by line? It should also be generated using git format-patch, and considering what it does, it should definitely be submitted upstream.
package/ipcalc/Config.in line 2
Quoted 8 lines
package/ipcalc/Config.in new file +2
-0@@ -0,0 +1,7 @@ +config BR2_PACKAGE_IPCALC + bool "ipcalc"
Have you tested this package using our ./utils/test-pkg utility? This typically allows to detect if your package has dependencies on some specific toolchain features that would need to be expressed here.
Other than those relatively small details, it looks very good. Could you adjust the patch, and send a new iteration?
Thanks a lot!
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com
PATCH 1/1 package: add ipcalc at version 1.0.0
Quoted 4 lines · Thomas Petazzoni
Hello Derrick,
Thanks for your contribution! It looks mostly good, I only have a few comments.
Thanks for the feedback. Will rework and resubmit. ~Derrick