summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xpackaging/locales-init.spec15
1 files changed, 10 insertions, 5 deletions
diff --git a/packaging/locales-init.spec b/packaging/locales-init.spec
index ab9dd6d..4c60867 100755
--- a/packaging/locales-init.spec
+++ b/packaging/locales-init.spec
@@ -1,9 +1,10 @@
Name: locales-init
Summary: Locales selection
Version: 1.0
-Release: 1
-Group: System/Libraries
+Release: 2
+Group: TO_BE/FILLED_IN
License: Apache License, Version 2.0
+Source0: %{name}-%{version}.tar.gz
Requires(post): eglibc-common
Requires(post): findutils
@@ -13,11 +14,15 @@ Locales selection
%build
echo "generating locales.."
+%prep
+
+%install
+
%post
-LOCALE_REGEXP="(az_AZ|eu_ES|bg_BG|ca_ES|zh_CN|zh_HK|zh_TW|hr_HR|cs_CZ|da_DK|nl_NL|en_GB|en_US|et_EE|fi_FI|fr_FR|gl_ES|ka_GE|de_DE|el_GR|hu_HU|is_IS|ga_IE|it_IT|ja_JP|kk_KZ|ko_KR|lv_LV|lt_LT|mk_MK|nb_NO|pl_PL|pt_PT|pt_BR|ro_RO|ru_RU|sk_SK|sl_SI|es_ES|es_US|sv_SE|tr_TR|uk_UA|uz_UZ|ar_AE|zh_SG|en_PH|fr_CA).utf8"
-LOCALE_REGEXP2="hy_AM|sr_RS|hi_IN"
+LOCALE_REGEXP="(az_AZ|eu_ES|bg_BG|ca_ES|zh_CN|zh_HK|zh_TW|hr_HR|cs_CZ|da_DK|nl_NL|en_GB|en_US|et_EE|fi_FI|fr_FR|gl_ES|ka_GE|de_DE|el_GR|hu_HU|is_IS|ga_IE|it_IT|ja_JP|kk_KZ|ko_KR|lv_LV|lt_LT|mk_MK|nb_NO|pl_PL|pt_PT|pt_BR|ro_RO|ru_RU|sk_SK|sl_SI|es_ES|es_US|sv_SE|tr_TR|uk_UA|uz_UZ|ar_AE|zh_SG|en_PH|fr_CA).utf8|(hy_AM|sr_RS|hi_IN)$"
+LOCALE_DIR="/usr/lib/locale"
-find /usr/lib/locale -maxdepth 1 -mindepth 1 | egrep -v "$LOCALE_REGEXP" | egrep -v "$LOCALE_REGEXP2" |
+find "$LOCALE_DIR" -maxdepth 1 -mindepth 1 | grep -Ev "$LOCALE_REGEXP"
while read line
do
rm -rf "$line"