Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 37 additions & 0 deletions locale-en-gb-1-0.be0
Original file line number Diff line number Diff line change
@@ -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.
##