diff --git a/antiword.sh b/antiword.sh new file mode 100644 index 0000000..bdc1af4 --- /dev/null +++ b/antiword.sh @@ -0,0 +1,11 @@ +#!/bin/sh + +# a shell wrapper to make 'antiword' usage reasonable on UTF-8 systems. +# +# Michal Jaegermann, michal@harddata.com, 2004/Nov/03 +# - simplify and we may be printing on a Postcript printer +# - so do not use -i0, 2006/May/08 + +echo "$@" | egrep -q -- '-p|-a' && lang="env LANG=${LANG%%.*}" +$lang antiword.bin "$@" +exit diff --git a/antiword.spec b/antiword.spec index 14f92da..78b4a98 100644 --- a/antiword.spec +++ b/antiword.spec @@ -1,8 +1,9 @@ Summary: MS Word to ASCII/Postscript converter Name: antiword Version: 0.37 -Release: 6%{?dist} -Source: http://www.winfield.demon.nl/linux/%{name}-%{version}.tar.gz +Release: 7%{?dist} +Source0: http://www.winfield.demon.nl/linux/%{name}-%{version}.tar.gz +Source1: antiword.sh URL: http://www.winfield.demon.nl/ Patch0: antiword-0.32-fix-flags.patch License: GPLv2+ @@ -26,7 +27,8 @@ OPT="$RPM_OPT_FLAGS" make all %{?_smp_mflags} %install %{__rm} -rf $RPM_BUILD_ROOT %{__mkdir_p} $RPM_BUILD_ROOT%{_bindir} -%{__install} -m 755 antiword $RPM_BUILD_ROOT%{_bindir} +%{__install} -m 755 antiword $RPM_BUILD_ROOT%{_bindir}/antiword.bin +%{__install} -m 755 %{SOURCE1} $RPM_BUILD_ROOT%{_bindir}/antiword %{__mkdir_p} $RPM_BUILD_ROOT%{_datadir}/%{name} %{__cp} -a Resources/* $RPM_BUILD_ROOT%{_datadir}/%{name} %{__mkdir_p} $RPM_BUILD_ROOT%{_mandir}/man1 @@ -50,6 +52,10 @@ iconv -f iso-8859-1 -t utf-8 Docs/Netscape > Docs/Netscape.utf8 %{_datadir}/%{name} %changelog +* Sun Apr 06 2008 Adrian Reber - 0.37-7 +- added wrapper script from Michal Jaegermann to better + handle UTF input files (#191060) + * Thu Feb 12 2008 Adrian Reber - 0.37-6 - rebuilt for gcc43