mirror of
https://github.com/motioneye-project/motioneyeos.git
synced 2025-07-28 13:46:32 +00:00
tz: new package
uClibc can not use timezone info from tzdata as-is, but accepts setting the local timezone in /etc/TZ. [Peter: strip quotes/use local TZ_LOCALTIME variable] Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com> [yann.morin.1998@free.fr: make it a blind package; little tweak to help text] Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
This commit is contained in:
parent
75622c75fa
commit
c3345b04f8
@ -816,6 +816,7 @@ source "package/protobuf/Config.in"
|
|||||||
source "package/protobuf-c/Config.in"
|
source "package/protobuf-c/Config.in"
|
||||||
source "package/schifra/Config.in"
|
source "package/schifra/Config.in"
|
||||||
source "package/startup-notification/Config.in"
|
source "package/startup-notification/Config.in"
|
||||||
|
source "package/tz/Config.in"
|
||||||
source "package/tzdata/Config.in"
|
source "package/tzdata/Config.in"
|
||||||
endmenu
|
endmenu
|
||||||
|
|
||||||
|
4
package/tz/Config.in
Normal file
4
package/tz/Config.in
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
config BR2_PACKAGE_TZ
|
||||||
|
bool
|
||||||
|
help
|
||||||
|
Timezone info for uClibc.
|
31
package/tz/tz.mk
Normal file
31
package/tz/tz.mk
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
################################################################################
|
||||||
|
#
|
||||||
|
# tz
|
||||||
|
#
|
||||||
|
################################################################################
|
||||||
|
|
||||||
|
TZ_SOURCE =
|
||||||
|
TZ_DEPENDENCIES = host-tzdata host-tzdump
|
||||||
|
TZ_LICENSE = Public domain
|
||||||
|
|
||||||
|
TZ_LOCALTIME = $(call qstrip,$(BR2_TARGET_LOCALTIME))
|
||||||
|
|
||||||
|
define TZ_BUILD_CMDS
|
||||||
|
(cd $(HOST_DIR)/usr/share/zoneinfo/posix/; \
|
||||||
|
for i in $$(find . -type f); do \
|
||||||
|
mkdir -p $(@D)/output/$$(dirname $$i); \
|
||||||
|
$(TZDUMP) -p . -q $${i#./} > $(@D)/output/$$i; \
|
||||||
|
done \
|
||||||
|
)
|
||||||
|
endef
|
||||||
|
|
||||||
|
define TZ_INSTALL_TARGET_CMDS
|
||||||
|
mkdir -p $(TARGET_DIR)/usr/share/zoneinfo/uclibc
|
||||||
|
cp -a $(@D)/output/* $(TARGET_DIR)/usr/share/zoneinfo/uclibc
|
||||||
|
if [ -n "$(TZ_LOCALTIME)" ]; then \
|
||||||
|
cd $(TARGET_DIR)/etc; \
|
||||||
|
ln -sf ../usr/share/zoneinfo/uclibc/$(TZDATA_LOCALTIME) TZ; \
|
||||||
|
fi
|
||||||
|
endef
|
||||||
|
|
||||||
|
$(eval $(generic-package))
|
Loading…
x
Reference in New Issue
Block a user