package/sunwait: new package
authorAngelo Compagnucci <angelo.compagnucci@gmail.com>
Fri, 11 Oct 2019 21:32:19 +0000 (23:32 +0200)
committerThomas Petazzoni <thomas.petazzoni@bootlin.com>
Mon, 21 Oct 2019 21:33:59 +0000 (23:33 +0200)
Sunwait calculates sunrise or sunset times with civil, nautical,
astronomical and custom twilights.

Signed-off-by: Angelo Compagnucci <angelo@amarulasolutions.com>
[Thomas:
 - add dependency on C++
 - improve the build logic to pass cflags/ldflags properly]
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
DEVELOPERS
package/Config.in
package/sunwait/Config.in [new file with mode: 0644]
package/sunwait/sunwait.hash [new file with mode: 0644]
package/sunwait/sunwait.mk [new file with mode: 0644]

index 199c59d429044b85879ce861335452951fa06c0d..db7d81fa868ecc2d24ab05f8fa3dce06be87183b 100644 (file)
@@ -185,6 +185,7 @@ F:  package/python-pillow/
 F:     package/python-pydal/
 F:     package/python-web2py/
 F:     package/sshguard/
+F:     package/sunwait/
 F:     package/sysdig/
 
 N:     Anisse Astier <anisse@astier.eu>
index f5af43081df44083ca4bec861f1d16dae364b7b8..d4cfd50a4bc3ba8ef7beb830d4eb3391fba91467 100644 (file)
@@ -1873,6 +1873,7 @@ menu "Miscellaneous"
        source "package/qemu/Config.in"
        source "package/qpdf/Config.in"
        source "package/shared-mime-info/Config.in"
+       source "package/sunwait/Config.in"
        source "package/taskd/Config.in"
        source "package/wine/Config.in"
        source "package/xutil_util-macros/Config.in"
diff --git a/package/sunwait/Config.in b/package/sunwait/Config.in
new file mode 100644 (file)
index 0000000..e141c77
--- /dev/null
@@ -0,0 +1,11 @@
+config BR2_PACKAGE_SUNWAIT
+       bool "sunwait"
+       depends on BR2_INSTALL_LIBSTDCPP
+       help
+         Sunwait calculates sunrise or sunset times with civil,
+         nautical, astronomical and custom twilights.
+
+         https://github.com/risacher/sunwait
+
+comment "sunwait needs a toolchain w/ C++"
+       depends on !BR2_INSTALL_LIBSTDCPP
diff --git a/package/sunwait/sunwait.hash b/package/sunwait/sunwait.hash
new file mode 100644 (file)
index 0000000..8396fa2
--- /dev/null
@@ -0,0 +1,3 @@
+# sha256 locally computed
+sha256  ef26ed05882d5286a64a37c4044f99b877cc54f58a46f0e37ca60c93398df910  sunwait-7326b53e5406c7ebd552ae6dc0fc659252a18e7f.tar.gz
+sha256  3972dc9744f6499f0f9b2dbf76696f2ae7ad8af9b23dde66d6af86c9dfb36986  LICENSE
diff --git a/package/sunwait/sunwait.mk b/package/sunwait/sunwait.mk
new file mode 100644 (file)
index 0000000..4b27e82
--- /dev/null
@@ -0,0 +1,26 @@
+################################################################################
+#
+# sunwait
+#
+################################################################################
+
+SUNWAIT_VERSION = 7326b53e5406c7ebd552ae6dc0fc659252a18e7f
+SUNWAIT_SITE = $(call github,risacher,sunwait,$(SUNWAIT_VERSION))
+SUNWAIT_LICENSE = GPL-3.0
+SUNWAIT_LICENSE_FILES = LICENSE
+
+SUNWAIT_MAKE_OPTS = \
+       $(TARGET_CONFIGURE_OPTS) \
+       C=$(TARGET_CXX) \
+       CFLAGS="$(TARGET_CFLAGS) -c" \
+       LDFLAGS="$(TARGET_LDFLAGS) -lm"
+
+define SUNWAIT_BUILD_CMDS
+       $(MAKE) $(SUNWAIT_MAKE_OPTS) -C $(@D) all
+endef
+
+define SUNWAIT_INSTALL_TARGET_CMDS
+       $(INSTALL) -D -m 0755 $(@D)/sunwait $(TARGET_DIR)/usr/bin/sunwait
+endef
+
+$(eval $(generic-package))