Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I'm a beginner in Debian packaging so sorry for the obvious question.

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 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)

share|improve this question

2 Answers 2

up vote 2 down vote accepted

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.

share|improve this answer
    
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 '11 at 18:14
    
That's a completely different question and is going to depend on what the files are and depend on the program. –  Arrowmaster Sep 13 '11 at 1:26

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.

share|improve this answer
    
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 '11 at 0:05

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.