rpmbuild - change sysconfdir
Michael Schwendt
mschwendt at gmail.com
Mon Sep 14 10:32:24 UTC 2015
On Mon, 14 Sep 2015 11:03:13 +0200, arnaud gaboury wrote:
> > %build
> > mkdir %{buildroot}/etc/R
>
> I already tried this method, with no sucess. Finally, after a close
> look at my SPEC file, I found one $ which has to be moved to % (I
> rewrote my file trying to use the conventional % for variable names
> instead of $).
> Then I could build with --sysconfdir=/etc/R
You only need to redefine %_sysconfdir at the top of your spec file,
since the %configure macro uses %_sysconfdir. See /usr/lib/rpm/macros
and this:
rpm --define "_sysconfdir /BLUBB" --eval %configure
No need to modify the %configure call in %build.
Also, there is nothing like a "conventional % for variable names
instead of $" in spec files. % is used by RPM. RPM-specific variables
in your spec file are expanded/substituted before passing the result
to the shell that is used to process the spec file sections. A close
look at rpmbuild output is a good way to look into it.
More information about the devel
mailing list