diff --git a/packages/devel/glibc/package.mk b/packages/devel/glibc/package.mk index bd0da7d7fc..f199012986 100644 --- a/packages/devel/glibc/package.mk +++ b/packages/devel/glibc/package.mk @@ -102,11 +102,6 @@ post_makeinstall_target() { cp -a ${INSTALL}/usr/share/i18n/locales ${INSTALL}/.noinstall mv ${INSTALL}/usr/share/i18n/charmaps ${INSTALL}/.noinstall - # Generic "installer" needs localedef to define drawing chars - if [ "${PROJECT}" != "Generic" ]; then - rm ${INSTALL}/usr/bin/localedef - fi - # we are linking against ld.so, so symlink ln -sf $(basename ${INSTALL}/usr/lib/ld-*.so) ${INSTALL}/usr/lib/ld.so @@ -123,12 +118,9 @@ post_makeinstall_target() { safe_remove ${INSTALL}/usr/lib/*.map safe_remove ${INSTALL}/var -# add UTF-8 charmap for Generic (charmap is needed for installer) - if [ "${PROJECT}" = "Generic" ]; then - mkdir -p ${INSTALL}/usr/share/i18n/charmaps - cp -PR ${PKG_BUILD}/localedata/charmaps/UTF-8 ${INSTALL}/usr/share/i18n/charmaps - pigz --best --force ${INSTALL}/usr/share/i18n/charmaps/UTF-8 - fi +# add UTF-8 charmap + mkdir -p ${INSTALL}/usr/share/i18n/charmaps + cp -PR ${INSTALL}/.noinstall/charmaps/UTF-8.gz ${INSTALL}/usr/share/i18n/charmaps if [ ! "${GLIBC_LOCALES}" = yes ]; then safe_remove ${INSTALL}/usr/share/i18n/locales diff --git a/packages/sysutils/busybox/package.mk b/packages/sysutils/busybox/package.mk index ae002922f0..a1497d7e98 100644 --- a/packages/sysutils/busybox/package.mk +++ b/packages/sysutils/busybox/package.mk @@ -197,6 +197,7 @@ post_install() { enable_service shell.service enable_service show-version.service enable_service var.mount + enable_service locale.service listcontains "${FIRMWARE}" "rpi-eeprom" && enable_service rpi-flash-firmware.service # cron support diff --git a/packages/sysutils/busybox/profile.d/10-locale.conf b/packages/sysutils/busybox/profile.d/10-locale.conf new file mode 100644 index 0000000000..31540b216c --- /dev/null +++ b/packages/sysutils/busybox/profile.d/10-locale.conf @@ -0,0 +1,5 @@ +# don't overwrite value set by Locale Kodi addon +if [ -z "${LOCPATH}" ]; then + export LANG="C.UTF-8" + export LOCPATH="/storage/.cache/locpath" +fi diff --git a/packages/sysutils/busybox/system.d/locale.service b/packages/sysutils/busybox/system.d/locale.service new file mode 100644 index 0000000000..689109ae63 --- /dev/null +++ b/packages/sysutils/busybox/system.d/locale.service @@ -0,0 +1,17 @@ +[Unit] +Description=Compile locale definition files +ConditionPathExists=!/storage/.cache/locpath +ConditionPathExists=!/storage/.kodi/addons/service.locale/locpath +Before=kodi.service + +[Service] +Type=oneshot +Environment=HOME=/storage +Environment=I18NPATH=/usr/share/i18n +ExecStartPre=/bin/mkdir /storage/.cache/locpath +ExecStart=/usr/bin/localedef --quiet -i POSIX -f UTF-8 /storage/.cache/locpath/C.UTF-8 +SuccessExitStatus=0 1 +RemainAfterExit=yes + +[Install] +WantedBy=multi-user.target