Here is part of my spec file:

-----------------------------------------------
Name: mattermost
Version: 3.4.0
Release: 1%{?dist}
Summary: Mattermost is an open source, self-hosted Slack-alternative
URL: http://www.mattermost.org
Source0: https://releases.mattermost.com/%{version}/mattermost-%{version}-linux-amd64.tar.gz
License: MIT
Group: System Environment/Daemons
........
%prep
%autosetup

---------------------------
Now testing:
$  fedpkg --dist f24 prep 

leaves me with this error:  mattermost-3.4.0: No such file or directory
$ ls returns in fact mattermost. I guess the difference is due to untar.

How can I tell in my spec file that the source directory will be named %{name} and not %{name}.%{version} ?

Then, I though the %autosetup macro would have download the source, which is not the case. I need to run $ spectool -g *spec to get the source. Is it the normal behavior?

Thank you for help.