6

I followed a tutorial to make a package application, but it only deals with the source; there's absolutely no other file types mentioned.

How do I include data files so that I can access them from my application in a package? For example, in the makefile, there's a $(DESTDIR) option, but I would never move the data files in $(DESTDIR)/usr/bin -- at least I think I'm not supposed to!

2 Answers 2

6

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.

1
  • Thanks. This answers the second part of my question, about the file system hierarchy, and provides me with help for the rest.
    – coyotte508
    Sep 14, 2011 at 0:05
4

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.

2
  • Thanks. I looked around a bit more, are those files supposed to be installed in like $(DESTDIR)/usr/share/games/<my program name>/ ? That's the real problem, I don't know where to put them.
    – coyotte508
    Sep 12, 2011 at 18:14
  • That's a completely different question and is going to depend on what the files are and depend on the program. Sep 13, 2011 at 1:26

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .