specfile: Secure the paths when creting tcsh.lang file

This commit is contained in:
David Kaspar [Dee'Kej] 2016-08-25 16:59:35 +02:00
parent fa980b7d85
commit 40ec3882a1
1 changed files with 9 additions and 7 deletions

View File

@ -130,14 +130,16 @@ install -p -m 644 tcsh.man %{buildroot}%{_mandir}/man1/tcsh.1
ln -sf tcsh %{buildroot}%{_bindir}/csh
ln -sf tcsh.1 %{buildroot}%{_mandir}/man1/csh.1
while read lang language ; do
dest=%{buildroot}%{_datadir}/locale/$lang/LC_MESSAGES
if test -f nls/$language.cat ; then
mkdir -p $dest
install -p -m 644 nls/$language.cat $dest/tcsh
# NOTE: We have to construct tcsh.lang by ourselves, since upstream does not use
# standard naming/placing of localization files for the gettext...
while read lang language; do
dest="%{buildroot}%{_datadir}/locale/$lang/LC_MESSAGES"
if [[ -f "nls/$language.cat" ]]; then
mkdir -p "$dest"
install -p -m 644 "nls/$language.cat" "$dest/tcsh"
echo "%lang($lang) %{_datadir}/locale/$lang/LC_MESSAGES/tcsh"
fi
done > tcsh.lang << _EOF
done > %{name}.lang << _EOF
de german
el greek
en C
@ -182,7 +184,7 @@ if [ ! -x %{_bindir}/tcsh ]; then
fi
%files -f tcsh.lang
%files -f %{name}.lang
%defattr(-,root,root,-)
%doc FAQ Fixes README complete.tcsh
%license COPYING