I noticed rpmbuild (-bb and --buildroot options) creates the .rpm in different locations depending of what OS are you using:
So how can I set manually the destination folder for all OS?
The RPMS directory is where the newly created binary package files are written. The SOURCES directory contains the original sources, patches, and icon files. The SPECS directory contains the spec files for each package to be built.
rpmbuild is used to build both binary and source software packages. A package consists of an archive of files and meta- data used to install and erase the archive files. The meta-data includes helper scripts, file attributes, and descriptive information about the package.
The build root is very similar to Root: (which is now legacy). By using Buildroot: in your spec file you are indicating that your package can be built (installed into and packaged from) a user-definable directory. This helps package building by normal users.
In most Unix shells, ~ is an abbreviation for "your home directory". So ~/. rpmmacros is the file . rpmmacros in your home directory.
Replying myself, adding:
%define _rpmdir /outputdir
to .spec file.
You may want to use the command argument --define
: For example, this will send the rpm files into the current directory.
rpmbuild anything.spec --bb --define "_rpmdir $(pwd)"
This will send the rpmsto output dir
rpmbuild anything.spec --bb --define "_rpmdir /outputdir"
Or perhaps something more complicated such as Custom gradle task for rpmbuild .
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With