Re: autotools gives autopain



On 1/3/06, BJörn Lindqvist <bjourne gmail com> wrote:
> > 4) I did not find any DESTDIR support, needed for comfortable packaging
> > without root privileges. One has to go back 10 years and use:
> >
> > scons PREFIX=$RPM_BUILD_ROOT/usr install
>
> What is destdir? Can you explain what the equivalent autotools/make
> thing is and what it does?

After software is compiled, it needs to be installed in some certain path
before packaging, say /home/abc/tmp. Using root privilege for packaging
is dangerous and discouraged. In above example, this is achieved by:
(assuming packager logged in as user 'abc' with normal user privilege)

make install DESTDIR=/home/abc/tmp

Then binaries to be placed in /usr/bin are installed into /home/abc/tmp/usr/bin
instead, and so on. Autotools generates makefiles that contain DESTDIR
support by default, like (of course this is just an example):

DESTDIR=
install-bin:
        -mkdir -p $(DESTDIR)$(bindir)
        install -m 755 -c foobar $(DESTDIR)$(bindir)/foobar

So packager can redefine DESTDIR freely during 'make install'.

Abel

>
> --
> mvh Björn
> _______________________________________________
> desktop-devel-list mailing list
> desktop-devel-list gnome org
> http://mail.gnome.org/mailman/listinfo/desktop-devel-list
>


--
Abel Cheung   (GPG Key: 0xC67186FF)
Key fingerprint: 671C C7AE EFB5 110C D6D1  41EE 4152 E1F1 C671 86FF
--------------------------------------------------------------------
* GNOME Hong Kong - http://www.gnome.hk/
* Opensource Application Knowledge Assoc. - http://oaka.org/


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]