mirror of
https://abf.rosa.ru/djam/glibc.git
synced 2025-02-23 06:52:49 +00:00
47 lines
1,006 B
Bash
47 lines
1,006 B
Bash
#!/bin/sh
|
|
LANGNAME="$1"
|
|
shift
|
|
LOCALE="$1"
|
|
if [ "$#" -gt 1 ]; then
|
|
shift
|
|
fi
|
|
|
|
cat <<EOF
|
|
%package -n locales-$LOCALE
|
|
Summary: Base files for localization ($LANGNAME)
|
|
Group: System/Internationalization
|
|
Requires: locales = %{EVRD}
|
|
Requires(pre): glibc = %{EVRD}
|
|
Requires(post,preun): sed
|
|
Requires(post,preun): grep
|
|
Conflicts: locales < %{EVRD}
|
|
Conflicts: locales > %{EVRD}
|
|
EOF
|
|
|
|
while echo "$1" |grep -q '^r:'; do
|
|
L="`echo $1 |cut -d: -f2-`"
|
|
echo "Obsoletes: locales-$L < %{EVRD}"
|
|
echo "Provides: locales-$L = %{EVRD}"
|
|
shift
|
|
done
|
|
|
|
cat <<EOF
|
|
%description -n locales-$LOCALE
|
|
These are the base files for $LANGNAME language
|
|
localization; you need it to correctly display
|
|
non-ASCII $LANGNAME characters, and for proper
|
|
alphabetical sorting, and representation of
|
|
dates and numbers according to
|
|
$LANGNAME language conventions.
|
|
|
|
%post -n locales-$LOCALE
|
|
%{_bindir}/locale_install.sh $@
|
|
|
|
%preun -n locales-$LOCALE
|
|
if [ "\$1" = "0" ]; then
|
|
%{_bindir}/locale_uninstall.sh $@
|
|
fi
|
|
|
|
%files -n locales-$LOCALE
|
|
EOF
|
|
echo
|