yocto_os/sources/meta-tsgrain/recipes-core/timezone/tzdata.bbappend

25 lines
792 B
Text

FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
SRC_URI_append = "\
file://set_tz \
"
do_install_append() {
install -d ${D}/data/timezone
install -d ${D}${bindir}
echo ${DEFAULT_TIMEZONE} > ${D}/data/timezone/timezone
ln -s ${datadir}/zoneinfo/${DEFAULT_TIMEZONE} ${D}/data/timezone/localtime
rm ${D}${sysconfdir}/timezone
rm ${D}${sysconfdir}/localtime
ln -s /data/timezone/timezone ${D}${sysconfdir}/timezone
ln -s /data/timezone/localtime ${D}${sysconfdir}/localtime
install -m 755 ${S}/set_tz ${D}${bindir}/set_tz
sed -i -e 's,@DATADIR@,${datadir},g' ${D}${bindir}/set_tz
}
FILES_tzdata-core += "/data/timezone/localtime /data/timezone/timezone ${bindir}/set_tz"
CONFFILES_tzdata-core = "/data/timezone/localtime /data/timezone/timezone"