I need my Debian rules file to simply copy files to it's target

Chip Castle picture Chip Castle · Jul 9, 2010 · Viewed 34.7k times · Source

I have a large project where we have the following files:

  • A few 3rd party pre-compiled binaries

Answer

Umang picture Umang · Jul 10, 2010

Although you've already got your own answer, I'll point out a couple of things.

You seem to be doing this in a very complicated manner. If you simply need to copy files into certain directories, write a debian/mypackagename.install with the following format:

path/to/file/relative/to/source/root path/to/install/relative/to/system/root

(do not prepend / before /usr, or /opt, or whatever your target directory is. Read man dh_install for more information)

Then your debian/rules can be:

#!/usr/bin/make -f

%:
    dh $@

If you have some sort of makefile, etc in your source root, then append this to the above rules file:

override_dh_auto_build:

override_dh_auto_install:

Don't forget put 7 in debian/compat.

Also, you shouldn't install files into /opt/ or /usr/local/, etc. Those are meant for files not installed by Debian packages. Debian recommends installing in /usr/share/yourcompany/. As juzzlin points out below, the Ubuntu Software Center may have different requirements.

More specifically, your mypackage.install file should look like this:

src/bin/* usr/bin
src/etc/* etc/