toshi,
Good observation. I did the following changes to the spec file:
#
# Tests for Fedora Core distro and then for UTF-8 enabled locale.
# For some reason, rpmbuild sets LANG="C" before executing prep section,
# so, don't waste your time :)
#
# I can put other hacks here to identify the distro and the LANG, just provide me the test.
#
if test -f /etc/redhat-release; then
DISTRO=FedoraCore
elif test -f /etc/whatever; then
DISTRO=Whatever
fi
case $DISTRO in
FedoraCore)
if grep -i "LANG" /etc/sysconfig/i18n | grep -i "UTF-8"; then
UTF8_SYSTRAY="--enable-utf8-systray"
fi
;;
Whatever)
# Do whatever.
;;
*)
# Unable to determine system locale, will not use UTF-8 systray.
;;
esac
CFLAGS="$RPM_OPT_FLAGS" ./configure ${UTF8_SYSTRAY} \
--prefix=%{_prefix} \
--disable-optimize \
...
Works fine here, please test. Anyone with Suse or Mandrake could please provide me the tests for the distro.
Cheers!