diff --git a/locale-en-gb-1-0.be0 b/locale-en-gb-1-0.be0 new file mode 100755 index 000000000..1e9a618c2 --- /dev/null +++ b/locale-en-gb-1-0.be0 @@ -0,0 +1,37 @@ +#!/bin/env beesh + +# BEE_VERSION locale-en-gb-1-0 + +## Compiles the en_GB locale (already shipped as source data by glibc, see +## /usr/share/i18n/locales/en_GB) into its own non-archive locale directory +## and packages that directory, instead of writing into glibc's +## /usr/lib/locale/locale-archive. +## +## Rationale: locale-archive is itself a file owned by the glibc bee package +## (see `bee query /usr/lib/locale/locale-archive`). Merging into it with +## `localedef --add-to-archive` would work, but a future glibc update/reinstall +## overwrites that file with the package's shipped version and silently drops +## the merge. A locale installed as its own directory under /usr/lib/locale/ +## is picked up by glibc automatically (it's checked before the archive) and +## is untouched by glibc package updates, so it survives them. + +SRCURL[0]="" + +mee_install() { + mkdir -p "$D/usr/lib/locale" + localedef --no-archive -i en_GB -f UTF-8 "$D/usr/lib/locale/en_GB.UTF-8" +} + +############################################################################### +## +## Build & install: +## bee install ./locale-en-gb-1-0.be0 +## (needs root for the actual system install step) +## +## Verify afterwards: +## locale -a | grep en_GB +## LC_ALL=en_GB.UTF-8 date +## +## To make it the system default, edit /etc/locale.conf separately - +## this package only makes the locale available, it doesn't set LANG. +##