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

Re: how to add a new file to deb when dpkg-builcpackage


On Mon, Aug 3, 2009 at 10:27 PM, tangke<tangk@lemote.com> wrote:
> hi all,
> I download the the src of kpowersave and changed some code,
> now i want to add a new file to this deb, and i can automaticly product the
> deb that contains it.
> how can i do it?
I would suggest overrides (debhelper 7.0.50 and later supports this),
though if you changed the source code then I would suggest using quilt
to do it.

I'm not entirely sure what you're trying to accomplish, so perhaps
explaining that is a better place to start.

If you are patching upstream code for redistribution, leave the source
intact and edit it through quilt. Then use the "--with quilt" target
(available in debhelper 7.0.8 and later) like so:

<TAB>dh --with quilt $@

For a tutorial on how to use quilt, you can see what the pkg-perl
group uses as a reference:


Once you do this, you will be able to build the package as per normal
(via dpkg-buildpackage) and quilt will be run as appropriate.

Come to think about it, my initial response about using overrides is
probably a red herring. You probably want to just use quilt, which
does not require overrides at all.

Here is a reference I wrote on using debhelper in some common
(Perl-package-specific mostly) scenarios, for example if you need to
remove a file from installation.

Hope this helps.



Reply to: