开发者

Conf files and static files in a deb package

I'm using dh_help to build a package template and trying to follow the ubuntu and debian packaging guides for creating a binary package.

How do I tell debuild which file is a conf file and should go for example to /etc/mypkg.conf ? I've tried to put it under mypkg-0.1/etc/mypkg/fname.conf开发者_开发百科 but debuild ignores it. The debian guide says all files under etc/ are treated automatically as conf files but it doesn't work for me (http://www.debian.org/doc/maint-guid...ml#s-conffiles). I've tried putting the conf file under mypkg-1.0/etc/mypkg.conf and under mypkg-1.0/debain/etc/mypkg.conf but it is not included. I also tried to list the file in conffiles but I'm getting an error that it can't be found when building the package.

I also don't understand how to include static files in the package. Do I have to use the install file to list all the files and folders? I thought that putting everything with the full path under the mypkgs-0.1 folder should work like it does when using dpkg manually.

Thanks


As viraptor said you can put an install command for each file into your debian/rules to install the files into the debian/pkgname directory.

Or you can use a debian/install file to simply list all the files (or just directories) and have a dh_install command in your debian/rules to do it for you.

It seems you are a little confused about how packages are built and which files are included. This is extremely generalized, but when the debian/rules script compiles a program using standard ./configure && make && make install method, it instructs the make install to install the files to debian/pkgname instead of /. Then it knows that everything under debian/pkgname is what should be in the final .deb. If the make install step doesn't put everything in the correct location, then the debian/rules script needs to do that. Previously it seems calling install ... from debian/rules to copy the files to the debian/pkgname directory was common but now using a debian/install file seems to be the preferred method.


You don't have to include the package version if you install files via the standard debhelper / debian/rules file. Instead, in the install step do:

install -cm 644 fname.conf $(CURDIR)/debian/mypkg/etc/mypkg/fname.conf

And it should be included properly.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜