4

Currently my program installs to /usr/bin or whatever and I need to change it to /opt/appname. Where do I specify that in the debian source package?

Rasmus

rasmusrim
  • 51
  • 1

1 Answers1

2

If there are files that need to be installed into your package but your standard make install won't do it, put the filenames and destinations into an install file. They are installed by dh_install.You should first check there is not a more specific tool to use. For example, documents should be in the docs file and not in this one.

This install file has one line per file installed, with the name of the file (relative to the top build directory) then a space then the installation directory (relative to the install directory). One example of where this is used is if a binary src/bar is left uninstalled; the install file might look like:

src/bar usr/bin

This means when this package is installed, there will be an executable command /usr/bin/bar.

Alternatively, this install can have the name of the file only without the installation directory when the relative directory path does not change. This format is usually used for a large package that splits the output of its build into multiple binary packages using package-1.install, package-2.install, etc.

So the only thing you need to do is to create a file named debian/my_package.install (replace my_package with the actual name of your package) with the following line:

path/to/your/program /opt/appname

Source