From af9808d887d96ea856f8627d7ec3eae2db4fb92c Mon Sep 17 00:00:00 2001 From: Silvan Calarco Date: Wed, 16 Oct 2024 22:05:24 +0200 Subject: [PATCH] configure glibc locales for langpack language in post scripts [release 4.1-2mamba;Wed Oct 16 2024] --- langpacks.spec | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/langpacks.spec b/langpacks.spec index 146621a..f17b399 100644 --- a/langpacks.spec +++ b/langpacks.spec @@ -1,6 +1,6 @@ Name: langpacks Version: 4.1 -Release: 1mamba +Release: 2mamba Summary: Langpacks meta-package Group: System/Internationalization Vendor: openmamba @@ -25,6 +25,22 @@ Summary: %{2} langpacks meta-package\ %description %{1}\ This package provides %{2} langpacks meta-package.\ \ +%post %{1}\ +if [ $1 -ge 1 ]; then\ + l=`echo %{1}|cut -d_ -f1`\ + sed -i "s|^#\\(%{l}_.* UTF-8\\)|\\1|" /etc/locale.gen\ + locale-gen\ +fi\ +:\ +\ +%postun %{1}\ +if [ $1 -eq 0 ]; then\ + l=`echo %{1}|cut -d_ -f1`\ + sed -i "s|^\\(%{l}_.* UTF-8\\)|#\\1|" /etc/locale.gen\ + locale-gen\ +fi\ +:\ +\ %files %{1}\ %defattr(-,root,root)\ %{_datadir}/metainfo/org.openmamba.LangPack-%{1}.metainfo.xml @@ -133,6 +149,9 @@ DESTDIR=%{buildroot} appstream-util split-appstream %{SOURCE0} [ "%{buildroot}" != / ] && rm -rf "%{buildroot}" %changelog +* Wed Oct 16 2024 Silvan Calarco 4.1-2mamba +- configure glibc locales for langpack language in post scripts + * Sun Jul 14 2024 Automatic Build System 4.1-1mamba - automatic update by autodist