By default, rpmbuild expects the basename () of the source file to exist in the% _topdir / SOURCES directory, regardless of where it is otherwise. In specification files, you will often see the URL (wget.spec):
Source: ftp://ftp.gnu.org/gnu/wget/wget-%{version}.tar.bz2
It does not retrieve it at build time, even if it was on your own file system. The error "There is no such file or directory" arises from the% setup macro, which searches for the file in the default location and does not see it.
The solution is to copy (or make a symbolic link) the file to the rpmbuild / SOURCES directory.
If for some reason you do not want to copy this file to the SOURCES user directory, you can use the -T option in% setup mecro, it tells it "Do not build archives by default" ":
%setup -T
You will have to unzip the archive yourself in the% prep section if you decide to go along this route.
source share