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

Re: Installing debs in ~user/ or /usr/local?



On Sat, May 05, 2001 at 10:00:14PM +0200, Egon Willighagen wrote:
> 
> maybe it is a stupid question, but can debian packages be installed in other 
> places than / ?

You could try the --root=dir, --admindir=dir or --instdir=dir options
to dpkg.  But I think that maybe this is not what you really want.

> I know that when the package is compiled the Makefile has a $DESTDIR
> attribute, but is this preserved in the deb package?

If the Makefile in the original source provides this functionality, then
that is convenient to use in the Debian package source's debian/rules
Makefile to install the binaries into the package build directory.

Related to this is the --prefix option that can be given to the typical
configure script in the original sources.  If you don't specify that
option when you "./configure", it usually defaults to /usr/local.
Debian packages are generally spoken configured with --prefix=/usr.

If user "egon" wants to install into his home directory, he should
run configure the source with --prefix=/home/egon.  After building
the program, doing a "make install" will put all the files somewhere
in /home/egon.  Also, the programs that are installed there will look
for their settings under /home/egon instead of /etc.

> This issue came up when i tried to convince someone that debian packages
> are a good addition to tar.gz for distribution... but one argument he gave, 
> was the question if non-root users could install debian packages?

Download package sources for your own rebuilding is just as easy as
downloading the prebuilt .deb packages.  Just add a "deb-src" line to
your /etc/apt/sources.list file for every "deb" line it already has.
After you "apt-get update", you can cd into a work directory and type:

  apt-get source somepkg

Then, do a "cd somepkf-*" and look around in the various README, INSTALL
and other textfiles.  There is a directory debian/ which contains some
maintainer files, one of which is the "rules" file.  This is a Makefile
that contains the rules to build the source for Debian and to create the
.deb package.  It gives you a very efficient way to find out if there
are any special tricks needed to compile the source.

Now you can run "./configure --help", "./configure [options]", "make"
and "make install".

> Is this possible?

This is how it used to be before there was Debian ;-)

Cheers,


Joost



Reply to: