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

Re: Help: debian packaging



Charles Majola wrote:

> I need help with this: how do I add configuration files to a debian package.
> I want to add files to /etc/package-name/config.d
> The package already creates the folder but not configuration files.

Hi,

Assuming you are using debhelper, you add a call to dh_install somewhere
in the appropriate install target of your debian/rules.  You also have a
file debian/install (or for multiple binary packages created from the
same source package, debian/<package>.install) whose contents look like
this, for instance:

debian/debian.conf      debian/<package>/etc/<package>/config.d
src/config/default.conf debian/<package>/etc/<package>/config.d

The first entry on each line gives the file to install, relative to the
source directory, and the second entry gives the directory to install it
to (obviously, replace <package> with the name of your binary package).

If you are using a debhelper compat level of 3 or greater, the files
will automatically be marked as conffiles since they are installed to
/etc.  For more details, see dh_install(1) and debhelper(7).

regards,

-- 
Kevin B. McCarty <kmccarty@princeton.edu>   Physics Department
WWW: http://www.princeton.edu/~kmccarty/    Princeton University
GPG public key ID: 4F83C751                 Princeton, NJ 08544



Reply to: