package: add host-faketime
authorPeter Korsgaard <peter@korsgaard.com>
Tue, 12 May 2015 08:51:31 +0000 (10:51 +0200)
committerPeter Korsgaard <peter@korsgaard.com>
Wed, 13 May 2015 08:12:17 +0000 (10:12 +0200)
For use by packages or post-build/image scripts to fake the current time for
obnoxious programs that insists on adding a timestamp.

Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Reviewed-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
package/Config.in.host
package/faketime/Config.in.host [new file with mode: 0644]
package/faketime/faketime.mk [new file with mode: 0644]

index 051bc4a137a671edd57d056962839fb422a7cbfe..1e047aadfd9332245c14ddd01f5850aa8fd20563 100644 (file)
@@ -7,6 +7,7 @@ menu "Host utilities"
        source "package/dosfstools/Config.in.host"
        source "package/e2fsprogs/Config.in.host"
        source "package/e2tools/Config.in.host"
+       source "package/faketime/Config.in.host"
        source "package/genext2fs/Config.in.host"
        source "package/genimage/Config.in.host"
        source "package/genpart/Config.in.host"
diff --git a/package/faketime/Config.in.host b/package/faketime/Config.in.host
new file mode 100644 (file)
index 0000000..0ebb963
--- /dev/null
@@ -0,0 +1,7 @@
+config BR2_PACKAGE_HOST_FAKETIME
+       bool "host faketime"
+       help
+         Faketime reports faked system time to programs without
+         having to change the system-wide time.
+
+         https://github.com/wolfcw/libfaketime
diff --git a/package/faketime/faketime.mk b/package/faketime/faketime.mk
new file mode 100644 (file)
index 0000000..292fe17
--- /dev/null
@@ -0,0 +1,20 @@
+################################################################################
+#
+# libfaketime
+#
+################################################################################
+
+FAKETIME_VERSION = v0.9.6
+FAKETIME_SITE = $(call github,wolfcw,libfaketime,$(FAKETIME_VERSION))
+FAKETIME_LICENSE = GPLv2
+FAKETIME_LICENSE_FILES = COPYING
+
+define HOST_FAKETIME_BUILD_CMDS
+       $(HOST_CONFIGURE_OPTS) $(MAKE) -C $(@D) PREFIX=$(HOST_DIR)/usr
+endef
+
+define HOST_FAKETIME_INSTALL_CMDS
+       $(HOST_CONFIGURE_OPTS) $(MAKE) -C $(@D) PREFIX=$(HOST_DIR)/usr install
+endef
+
+$(eval $(host-generic-package))