fedora - How to pass variables into spec files? -
i writing first spec file , 1 thing not understand how make dynamic. using other spec files reference , noticed many have name / version loaded dynamically. wondering how this? here example:
http://svn.apache.org/repos/asf/hbase/branches/0.94/src/packages/rpm/spec/hbase.spec
mainly wondering these sections mean:
%define _source @package.name@ %define _final_name @final.name@ %define _prefix @package.prefix@ %define _bin_dir %{_prefix}/bin %define _conf_dir @package.conf.dir@ %define _include_dir %{_prefix}/include ....
also i'm wondering {_prefix} is?
sorry newbie questions. i'm having unusual amount of trouble finding info on this.
%{_prefix}
(and lots of other macros) defined in /usr/lib/rpm/macros
. these read rpmbuild
, substituted when parsing spec file. %{_prefix}
denotes installation prefix used when installing things root filesystem. /usr
. macros in /usr/lib/rpm/macros*
define paths , more according file system layout , packaging conventions of distribution 1 building package on. instance, distro might reason want have binaries installed in /foo/bin
, in case ship macro file %{_bindir}
macro set accordingly.
all keys between @
(such @package.name@
) usually denote placeholders autoconf variables, these substituted when running autoconf
, see [1]. these used automatically generate appropriate file (in case, spec file) template (which includes said @
delimited placeholders) when configuring source package.
as far passing other variables concerned, here options [2]. these may used when user wishes able dynamically control aspects of package.
[2] how pass user defined parameters rpmbuild fill variables
Comments
Post a Comment