Ubuntu: Rebuild A Source Package

# install deb build tools

sudo apt-get install build-essential fakeroot dpkg-dev devscripts

# download the source code

apt-get source package

# install other packages needed to build

sudo apt-get build-dep package
cd package

# update the version in the changelog

dch -i

# make any changes to the source
# e.g. vim debian/rules

# then build the new package

dpkg-buildpackage -rfakeroot -uc -b

#install the package

cd ..
sudo dpkg -i package.deb
This entry was posted in <linux> and tagged , , , , , , . Bookmark the permalink.
  • http://www.ralfebert.de/blog/ Ralf Ebert

    Thanks, this was very helpful.
    Also helpful if you want to apply a patch to debian source packages: http://www.debian.org/doc/maint-guide/ch-build.en.html#s-dpatch

  • Joel

    Thanks. This worked exactly as advertised. Now, if only some package maintainers would include the instructions in their package so that specific details could more readily be handled. Perhaps others would find themselves more involved the nuts and bolts of experimentation. LOL

  • Jose M.

    Thanks, it works!!

  • http://julka.wystawiennictwozesmakiem.pl/a/Biura-rachunkowe-Wroclaw,6287 Paul Mark

    I’m happy that I found your blog and this particular entry. I have not read anything so good and well prepared.

<RSS Feed>