2023-11-29 03:42:55 -06:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
SRC=dict.lst
|
|
|
|
[[ -f $SRC ]] || exit 1
|
|
|
|
SPEC=CentOS-9/SPECS/libreoffice.spec
|
|
|
|
[[ -f $SPEC ]] || exit 2
|
|
|
|
|
|
|
|
for D in `cat dict.lst` ; do
|
|
|
|
LNG=`cut -d '-' -f 2-3 <<< $D`
|
|
|
|
LNW=`sed 's/#.*$//' $SPEC | grep 'langpack -l' | grep " $LNG " \
|
|
|
|
| head -1 | cut -d ' ' -f 5`
|
|
|
|
if [[ -n $LNW ]] ; then
|
|
|
|
if [[ -n `grep langpack <<< $LNW` ]] ; then
|
|
|
|
#echo "Looking for $LNG " >&2
|
|
|
|
LNW=`sed 's/#.*$//' $SPEC | grep -B1 $LNG | grep 'define' \
|
|
|
|
| head -1 | cut -d ' ' -f 3-9`
|
|
|
|
#LNW=$LNP
|
|
|
|
fi
|
|
|
|
#echo "$D - $LNW"
|
|
|
|
cat << EOF
|
|
|
|
%package myspell-$D
|
2023-12-01 13:24:54 -06:00
|
|
|
Summary: Myspell $LNW dictionary
|
2023-11-29 03:42:55 -06:00
|
|
|
BuildArch: noarch
|
|
|
|
|
|
|
|
%description myspell-$D
|
2023-12-01 13:24:54 -06:00
|
|
|
Myspell $LNW dictionary
|
2023-11-29 03:42:55 -06:00
|
|
|
|
|
|
|
%files myspell-$D
|
|
|
|
%{baseinstdir}/share/extensions/$D
|
|
|
|
|
|
|
|
EOF
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
|