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

Re: DESTDIR Support for debian/install



T o n g <mlist4suntong@yahoo.com> writes:

> Not it the 'debian/install' file that should be fixed. Here is its 
> content:
>  
> -------------------------------
> usr/bin/tbuild usr/lib/glimpse
> usr/bin/cast usr/lib/glimpse
> usr/bin/uncast usr/lib/glimpse
> usr/bin/buildcast usr/lib/glimpse
> usr/bin/glimpseindex
> usr/bin/wgconvert usr/lib/glimpse
> usr/bin/glimpse
> usr/bin/glimpseserver
> usr/share/man
> -------------------------------

> All usr/bin/ files have been successfully generated under
> debian/glimpse/ usr/bin. Should I change all 'usr' to
> 'debian/glimpse/usr' without knowing why, or there is more proper way to
> fix it?

It looks like you're installing (from upstream) directly into
debian/glimpse, which is the final staging area for the package.
Generally, when you're using dh_install, you want to install somewhere
else (debian/tmp is the convention) and then use dh_install to move the
files over, as mentioned in the dh_install page:

    From debhelper compatibility level 7 on, dh_install will fall back to
    looking in debian/tmp for files, if it doesn't find them in the current
    directory (or whereever you've told it to look using --sourcedir).

debhelper, however, defaults to running make install
DESTDIR=debian/$(PACKAGE) when the source package builds only one binary
package.

So, you have a few options:

1. Override the default dh_auto_install rule to pass
   --destdir=$(CURDIR)/debian/tmp:

      override_dh_auto_install:
              dh_auto_install --destdir=$(CURDIR)/debian/tmp

   (be sure to fix the indentation to be a tab), and then use dh_install
   per the above to move the files from there.

2. Let the package install directly into debian/glimpse and then just move
   the files around yourself instead of using dh_install.  Which in this
   case means making a debian/glimpse/usr/lib/glimpse directory and moving
   some of the files into it.

-- 
Russ Allbery (rra@debian.org)               <http://www.eyrie.org/~eagle/>


Reply to: