mirror of
https://github.com/motioneye-project/motioneyeos.git
synced 2025-07-28 05:36:32 +00:00
system: add selection of a default localtime
[Peter: strip quotes/use local TZDATA_LOCALTIME variable] Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> [alexandre.belloni: move from "tzdata" to "system configuration"] Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com> [yann.morin.1998@free.fr: move into the BR2_TARGET_TZ_INFO conditionnal block] 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
d6a37917dd
commit
3f595cde97
@ -19,6 +19,8 @@ else
|
|||||||
TZDATA_ZONELIST = $(call qstrip,$(BR2_TARGET_TZ_ZONELIST))
|
TZDATA_ZONELIST = $(call qstrip,$(BR2_TARGET_TZ_ZONELIST))
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
TZDATA_LOCALTIME = $(call qstrip,$(BR2_TARGET_LOCALTIME))
|
||||||
|
|
||||||
# Don't strip any path components during extraction.
|
# Don't strip any path components during extraction.
|
||||||
define TZDATA_EXTRACT_CMDS
|
define TZDATA_EXTRACT_CMDS
|
||||||
gzip -d -c $(DL_DIR)/$(TZDATA_SOURCE) \
|
gzip -d -c $(DL_DIR)/$(TZDATA_SOURCE) \
|
||||||
@ -41,6 +43,11 @@ define TZDATA_INSTALL_TARGET_CMDS
|
|||||||
for zone in posix/*; do \
|
for zone in posix/*; do \
|
||||||
ln -sfn "$${zone}" "$${zone##*/}"; \
|
ln -sfn "$${zone}" "$${zone##*/}"; \
|
||||||
done
|
done
|
||||||
|
if [ -n "$(TZDATA_LOCALTIME)" ]; then \
|
||||||
|
cd $(TARGET_DIR)/etc; \
|
||||||
|
ln -sf ../usr/share/zoneinfo/$(TZDATA_LOCALTIME) localtime; \
|
||||||
|
echo "$(TZDATA_LOCALTIME)" >timezone; \
|
||||||
|
fi
|
||||||
endef
|
endef
|
||||||
|
|
||||||
$(eval $(generic-package))
|
$(eval $(generic-package))
|
||||||
|
@ -288,6 +288,20 @@ config BR2_TARGET_TZ_ZONELIST
|
|||||||
The full list is the list of files in the time zone database source,
|
The full list is the list of files in the time zone database source,
|
||||||
not including the build and .tab files.
|
not including the build and .tab files.
|
||||||
|
|
||||||
|
config BR2_TARGET_LOCALTIME
|
||||||
|
string "default local time"
|
||||||
|
help
|
||||||
|
The time zone to install as the default local time, expressed as a
|
||||||
|
tzdata location, such as:
|
||||||
|
GMT
|
||||||
|
Europe/Paris
|
||||||
|
America/New_York
|
||||||
|
Pacific/Wallis
|
||||||
|
...
|
||||||
|
|
||||||
|
If empty, no local time will be set, and the dates will be
|
||||||
|
expressed in UTC.
|
||||||
|
|
||||||
endif # BR2_TARGET_TZ_INFO
|
endif # BR2_TARGET_TZ_INFO
|
||||||
|
|
||||||
config BR2_TARGET_GENERIC_REMOUNT_ROOTFS_RW
|
config BR2_TARGET_GENERIC_REMOUNT_ROOTFS_RW
|
||||||
|
Loading…
x
Reference in New Issue
Block a user