[CentOS] Rpmbuild and how to disable automatic dependency list creation.

Mon Sep 29 12:43:11 UTC 2008
Friedrich Clausen <fred at derf.nl>

Hello All,

When I build RPM packages, rpmbuild always scans all the executables,
shared libs, perl scripts, etc. to find out which external libraries
the application depends on. This is normally a Good Thing but I am
currently packaging an in-house, self contained application.

I could almost use a tarball but an RPM provides better manageability
and also allows post-installation tasks. All shared libraries are
under a single prefix, which is not in the system-wide ld.so.conf - it
is configured in the startup script of the application. However,
rpmbuild finds all these dependencies and adds them to the list of
"Requires", which is not desirable in this case.

My question therefore is - how can I tell rpmbuild to stop
automatically creating a dependency list? The best I can come up with
at the moment is to add the following to my ~/.rpmmacros (line numbers
added by me):

[1] %__os_install_post  /usr/lib/rpm/brp-strip-comment-note
[2] %__find_requires   /bin/true
[3] %__perl_requires   /bin/true

So:

[1] - Stop it stripping already stripped binaries.
[2] and [3] - This stops it doing the automatic dependency list creation.

This seems a bit heavy handed though, is there another, cleaner way to do it?

Regards,

Fred.