From 3d1235af060955e271be68240c0ca46bc6d81b03 Mon Sep 17 00:00:00 2001 From: Jonathan Bauer Date: Tue, 25 Mar 2014 15:24:04 +0100 Subject: [modules] new module naming convention rename $MODULE.{conf,build} to module.{conf,build} --- remote/modules/german/module.build | 39 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 remote/modules/german/module.build (limited to 'remote/modules/german/module.build') diff --git a/remote/modules/german/module.build b/remote/modules/german/module.build new file mode 100644 index 00000000..cd68f009 --- /dev/null +++ b/remote/modules/german/module.build @@ -0,0 +1,39 @@ +fetch_source() { + : +} + +build() { + # Debian-like + if [ -e "/etc/locale.gen" ] && ! grep -q -E '^\s*de_DE\.UTF-8' "/etc/locale.gen"; then + pinfo "Generating locales..." + echo 'de_DE.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_DE.utf8 ]; then + pinfo "Generating locales..." + grep -q -E -r '^\s*de_DE\.UTF-8' "/var/lib/locales/supported.d" || echo 'de_DE.UTF-8 UTF-8' >> "/var/lib/locales/supported.d/openslx" + locale-gen --no-archive --purge "de_DE.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_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_DE.UTF-8 || perror "$i: add_env function failed." + done +} + -- cgit v1.2.3-55-g7522