[Fedora-directory-devel] Please review: Bug 213352: autotools: support redhat/fedora rpmbuild %configure and %makeinstall

Richard Megginson rmeggins at redhat.com
Tue Oct 31 23:29:01 UTC 2006


https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=213352
Bug(s) fixed: 213352
Bug Description: autotools: support redhat/fedora rpmbuild %configure 
and %makeinstall
Reviewed by: ???
Files: see diff
Branch: HEAD
Fix Description: The standard way to do an rpmbuild on fedora/redhat is 
to use the %configure
macro in the %prep section of the spec file and the %makeinstall macro 
in the
%install section.  These set all of the bindir, libdir, datadir, sysconfdir,
etc. paths used by the application.  %configure sets them to their "real"
runtime locations e.g. /usr/lib, and %makeinstall sets them to their 
paths used
for rpm packaging e.g. /var/tmp/fedora-ds-foo-bar-baz/usr/lib.  There 
were a few
places in our autotools files where we were running afoul of this.

Another thing is that configure defines bindir etc. as literally
'${exec_prefix}/bin' so that the real value doesn't get expanded until 
make or
make install time.  This means that we cannot create scripts from 
templates in
configure, we have to do that in make.  So this adds a sed command to
Makefile.am in order to do all of the script and config file path 
replacement at
make time.

Since we do the subst this way, whatever $prefix is set during make will be
incorporated into the value of $bindir etc. so we can omit directly 
referencing
@prefix@ in the template files.
Platforms tested: RHEL4
Flag Day: no
Doc impact: no
https://bugzilla.redhat.com/bugzilla/attachment.cgi?id=139919&action=diff

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3178 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://listman.redhat.com/archives/fedora-directory-devel/attachments/20061031/bc082f24/attachment.bin>


More information about the Fedora-directory-devel mailing list