blob: c445c544bf406064d8e342194221e317e2d665b6 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
|
#!/bin/bash
fetch_source() {
:
}
build() {
CH_LOCALES="de_CH.UTF-8 fr_CH.UTF-8 it_CH.UTF-8"
# Debian-like
if [ -e "/etc/locale.gen" ] && ! grep -q -E '^\s*de_CH\.UTF-8' "/etc/locale.gen"; then
pinfo "Generating locales..."
echo 'de_CH.UTF-8 UTF-8' >> "/etc/locale.gen"
echo 'fr_CH.UTF-8 UTF-8' >> "/etc/locale.gen"
echo 'it_CH.UTF-8 UTF-8' >> "/etc/locale.gen"
locale-gen || perror "Could not generate locales (debian style)"
fi
# Ubuntu's version
if [ -d "/var/lib/locales/supported.d" ] && [ ! -d /usr/lib/locale/de_CH.utf8 ]; then
pinfo "Generating locales..."
grep -q -E -r '^\s*de_CH\.UTF-8' "/var/lib/locales/supported.d" || echo 'de_CH.UTF-8 UTF-8' >> "/var/lib/locales/supported.d/openslx"
locale-gen --no-archive --purge "de_CH.UTF-8" || perror "Could not generate locales (ubuntu style)"
fi
if [ -d "/var/lib/locales/supported.d" ] && [ ! -d /usr/lib/locale/fr_CH.utf8 ]; then
pinfo "Generating locales..."
grep -q -E -r '^\s*fr_CH\.UTF-8' "/var/lib/locales/supported.d" || echo 'fr_CH.UTF-8 UTF-8' >> "/var/lib/locales/supported.d/openslx"
locale-gen --no-archive "fr_CH.UTF-8" || perror "Could not generate locales (ubuntu style)"
fi
if [ -d "/var/lib/locales/supported.d" ] && [ ! -d /usr/lib/locale/it_CH.utf8 ]; then
pinfo "Generating locales..."
grep -q -E -r '^\s*it_CH\.UTF-8' "/var/lib/locales/supported.d" || echo 'it_CH.UTF-8 UTF-8' >> "/var/lib/locales/supported.d/openslx"
locale-gen --no-archive "it_CH.UTF-8" || perror "Could not generate locales (ubuntu style)"
fi
# Put everything we build or get from the system in build dir
local FILELIST="$MODULE_WORK_DIR/list_copy_build"
rm -f "$FILELIST"
# Copy required directories from source system to build dir
for FILE in ${REQUIRED_DIRECTORIES}; do
[ ! -d "${FILE}" ] && perror "Missing required directory $FILE"
echo ${FILE} >> "${FILELIST}"
done
# Done collecting file and directory names, copy everything
tarcopy "$(sort -u "$FILELIST")" "$MODULE_BUILD_DIR"
}
post_copy() {
for i in LANG LC_CTYPE LC_NUMERIC LC_TIME LC_COLLATE LC_MONETARY LC_MESSAGES LC_PAPER LC_NAME LC_ADDRESS LC_TELEPHONE LC_MEASUREMENT LC_IDENTIFICATION; do
add_env $i de_CH.UTF-8 || perror "$i: add_env function failed."
done
}
|