[ldns-users] ldns clean target, spec file for rpm building

Paul Wouters paul at xelerance.com
Wed Oct 5 15:49:37 UTC 2005

On Wed, 5 Oct 2005, Jelte Jansen wrote:

> yes there were some prefix references instead of libdir (and some other
> ones). They should be fixed now (in trunk)

I will try that later today then.

> they are all moved to the examples/ dir now anyway, the progs targets
> have been removed


>> And finally, as with the nsd build process, the 'make install' target does
>> not allow installing in a "dist" or "inst_prefix_dir"  directory, so it
>> cannot be re-used for rpm building.
> i have no experience with rpm building, what exactly is needed besides
> prefix and *dir configure arguments? (in the make/configuration
> department that is)

Okay, the problem is as follows. For a packaged distribution you want libldns
to end up in /usr/lib/ (or /usr/lib64 on x86_64). But you do not want to
actually have 'make install' put the files there, because you want to install
this in "build" directory. For rpm, the build usually happens in
/usr/src/redhat/BUILD/packagename/ and though the prefix is "/usr", the
install target should be able to install into something like $dist/$prefix,
which in this case would be like /var/tmp/rpm-packagename-version-root/usr/
See it as a 'sort of' chroot(/var/tmp/rpm-packagename-version-root) before
running 'make install'.

For example, another package for which I maintain the rpm building is libotr,
which in the rpm's specfile has the following:

%configure --with-pic
make %{?_smp_mflags} all

make \
         LIBINSTDIR=%{_libdir} \

The "%configure" is a shortcut for the distribution's configure call, which
for Fedora would expand to "./configure --prefix=/usr --libdir=/usr/lib 
--includedir=/usr/include ...."

Then it actually installs the library in $RPM_BUILD_ROOT/$libdir, and when
the package gets installed, it actually installs the files in /usr/lib{64}/

Does this explanation make some sense?


More information about the ldns-users mailing list