On Fri, 04 Mar 2011 08:27:22 +1100
David Timms <dtimms(a)iinet.net.au> wrote:
On 04/03/11 00:17, Paul Howarth wrote:
> I think the Makefile already supports DESTDIR; try using:
>
> make install \
> DESTDIR=%{buildroot} \
> bindir=%{_bindir} \
> helpdir=%{_datadir}/%{name} \
> mandir=%{_mandir}
OK, thanks guys.
I hadn't noticed the DESTDIR capability. I was reading
the ./configure --help, which mentions:
=====
Installation directories:
--prefix=PREFIX install architecture-independent files in
PREFIX [/usr/local]
--exec-prefix=EPREFIX install architecture-dependent files in
EPREFIX [PREFIX]
By default, `make install' will install all the files in
`/usr/local/bin', `/usr/local/lib' etc. You can specify
an installation prefix other than `/usr/local' using `--prefix',
for instance `--prefix=$HOME'.
For better control, use the options below.
Fine tuning of the installation directories:
--bindir=DIR user executables [EPREFIX/bin]
--sbindir=DIR system admin executables [EPREFIX/sbin]
--libexecdir=DIR program executables [EPREFIX/libexec]
...
=====
My most recent spec had:
make install \
prefix=%{buildroot}%{_prefix} \
execprefix=%{buildroot}%{_bindir} \
bindir=%{buildroot}%{_bindir} \
datadir=%{buildroot}%{_datadir}
helpdir=%{buildroot}%{_datadir}/%{name} \
mandir=%{buildroot}%{_mandir} \
, which hadn't made much difference.
Where does DESTDIR definition come from ?
Where is it normally documented ?
It's fairly standard these days and comes "for free" with autotools
though other build systems often use it too. What you were using was
essentially what the old %makeinstall macro did, which should be
avoided if possible:
http://fedoraproject.org/wiki/PackagingGuidelines#Why_the_.25makeinstall_...
Paul.