Build from a source .deb

John Ruschmeyer jruschme at
Mon Nov 14 13:59:40 UTC 2005

Dennis Kaarsemaker wrote:

>On zo, 2005-11-13 at 17:40 +0100, Robert Entner wrote:
>>I would like to take a source .deb package, change exactly one .c
>>file, and then generate a regular binary .deb package out of it.
>>I suppose that requires just very few commands, can you please help
>sudo apt-get build-dep $package
>sudo apt-get install build-essential
>mkdir temp
>cd temp
>apt-get source $package
>cd $package-$version
>[make-the change]
>dpkg-buildpackage -rfakeroot
>cd ..
>sudo dpkg -i $package-$version.deb
>cd ..
>rm -rf temp 
One thing I don't get, though....

I've tried this basic routine before, but always had problems with the 
locally built package being overwritten by the one from the repository 
on the next 'apt-get upgrade'. Is there an easy way to avoid that? So 
far, I've only been able to do it by adding a ".1" to the version number 
in the debian/Changelog file.


More information about the ubuntu-users mailing list