How to include data files (pictures, text files, ...) in a debian package
If you make a Debian package, you should at least glance through the Debian Policy Manual and the Debian New Maintainers' Guide, as well as the Filesystem Hierarchy Standard. If you want to become a Debian developer, you need to read the policy and the maintainters' guide.
The policy manual explains where various file types go, when they need to be found by other programs. For data files that are needed by your program, use a directory that's specific to your program, either /usr/share/myprogram
or /usr/lib/myprogram
(share is prefered if the files are not architecture-dependent).
It's recommended that you use dh-make to create your package. Inside debian/rules
, use dh_install
to copy generic data files to their installation directory under debian/tmp
.
If you are including binary data (pictures) you will want to create a version 3.0 package.
You put the additional files inside the debian/
directory and either move them from the debian/rules
script using install -D -m 644 debian/filename $(DESTDIR)/path/to/install/to
or using the debian/install
file to list the file and the path to install it to like debian/filename path/to/install/to
.