On Sat, 14 Jan 2017 16:57:42 +0000, arnaud gaboury wrote:

> %prep
> %autosetup -n platform-master
> 
> # many golang binaries are "vendoring" (bundling) sources, so remove them.
> Those dependencies need to be packaged independently.
> cd %{_builddir}

Don't get accustomed to that. Don't cd into %_builddir directly.

Run "rpm -E %_builddir" to see which directory that macro expands to.
There are corner-cases when you need to use the %_builddir macro.
In most cases, you don't need to use it at all.

The %setup and %autosetup macros define the top-level build directory
below %_builddir, and at the start of every spec file section (e.g. %build,
%install, %check, even %files), that build directory is entered automatically.
It may also be cleaned up automatically depending on your rpmbuild option
and the default %clean section.

Create all your other working directories below $(pwd), not anywhere
above %_builddir. You can access relative paths from current
directory, which is much more convenient.

In your case, because of using %autosetup -n platform-master, the
root directory is

  %{_builddir}/platform-master

and if you read rpmbuild output, you should see that the directory is
entered automatically for every spec file section. If you've used %autosetup
correctly, you should find the extracted source code below that directory,
too. If you need another top-level directory, you can use option -c to
create it.

The way you jump to absolute paths and even create links that lead back to
some absolute %_builddir path makes the spec file look like a mess.
_______________________________________________
users mailing list -- users@lists.fedoraproject.org
To unsubscribe send an email to users-le...@lists.fedoraproject.org

Reply via email to