Error when building taoframework rpm.

Hi,

I tried to make a rpm package from taoframework tar.gz file : SourceForge.net: The Tao Framework: Downloading …

But I got a weird error :

+ '' 0 -ne 0 ']'
++ /usr/bin/id -u
+ '' 1000 = 0 ']'
++ /usr/bin/id -u
+ '' 1000 = 0 ']'
+ /bin/chmod -Rf a+rX,u+w,g-w,o-w .
+ $'\r'
: command not found658: line 34:
error: Bad exit status for /var/tmp/rpm-tmp.81658 (%prep)

Here is prep section in spec file :

%prep  
%setup -q -c -n %{name}-%{version}

And the rpm-tmp.81658 :

if  $STATUS -ne 0 ]; then
  exit $STATUS
fi
 `/usr/bin/id -u` = '0' ] && /bin/chown -Rhf root .
 `/usr/bin/id -u` = '0' ] && /bin/chgrp -Rhf root .
/bin/chmod -Rf a+rX,u+w,g-w,o-w .
  

exit 0

I really don’t get what’s wrong with

+ $'\r'

line.