[TriLUG] compiling RPM on a non Red Hat system

Jeremy Portzer jeremyp at pobox.com
Fri Apr 4 08:28:37 EST 2003


On Thu, 2003-04-03 at 21:05, Frank Hale (majic) wrote:
> 
> Okay one more question. When RPM is installed it
> creates its build dirs in: /usr/src/pc
> 
> usr/src/pc/BUILD/
> usr/src/pc/RPMS/
> usr/src/pc/RPMS/athlon/
> usr/src/pc/RPMS/i386/
> usr/src/pc/RPMS/i486/
> usr/src/pc/RPMS/i586/
> usr/src/pc/RPMS/i686/
> usr/src/pc/RPMS/noarch/
> usr/src/pc/SOURCES/
> usr/src/pc/SPECS/
> usr/src/pc/SRPMS/
> 
> I wanna change the dir pc to the name of my distro.
> I've looked through all of the configure options. And
> I've looked through alot of the files in the rpm
> tarball. Could somebody point me to a reference on how
> to change the default path for the RPM build dirs.

This is the "%_topdir" macro.  Often this is set in a per-user
~/.rpmmacros file.

See for example:
http://www.trilug.org/~lovelace/presentations/rpm/RPM_Packaging_101.html
(go to the slide titled "Setting up the RPM Build Environment")

This is all across Google if you search on "rpm topdir" also.

There are numerous other macros you can set to adjust the building of
RPMs.  Also, you can set the macros on a system-wide basis in
/etc/rpm/macros I think, but since you should never be building RPMs as
root anyway, that doesn't matter. ;-)

If you really want to change the overall default, you can also look at
/usr/lib/rpm/macros, though you're really not supposed to edit that
(instead add your own to /etc/rpm/macros or ~/.rpmmacros ).  

Hope this helps,

--Jeremy


-- 
/=====================================================================\
| Jeremy Portzer       jeremyp at pobox.com       trilug.org/~jeremy     |
| GPG Fingerprint: 712D 77C7 AB2D 2130 989F  E135 6F9F F7BC CC1A 7B92 |
\=====================================================================/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <http://www.trilug.org/pipermail/trilug/attachments/20030404/83ed3f06/attachment.pgp>


More information about the TriLUG mailing list