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

Re: How to make deb packages when compiling from source?



Amit Uttamchandani wrote:

> Hey everyone,
> 
> I've recently been compiling a few programs from source. I then realized
> that I might have to uninstall them in the future. Thus, I did a quick
> google search and the main point was that after compiling create a .deb
> file and then install the software. Then I could just use dpkg to install
> and uninstall the software correct?
> 
> How is this done? And what is the proper procedure?

There are multiple ways of achieving this. Assuming that the package that
you are interested is already in debian, you can use pdebuild to build the
packages.

1) simplest way
download the source
  apt-get source packagename
install the necessary dependencies
  apt-get build-dep packagename
change directory
  cd packagename
make necessary changes in the source
build the package
  dpkg-buildpackage -us -uc -rfakeroot

I use the above procedure to build gnuplot packages with readline and
history support. More detailed instructions can be found at
http://malayamaarutham.blogspot.com/2007/04/build-gnuplot-with-gnu-readline-and.html

2) most general way - use pbuilder, pdebuild
This method, for example, can be used to build packages for a machine
running Sid on a machine running stable. Instructions on this can be found
at
http://malayamaarutham.blogspot.com/2007/04/recipe-for-building-texmacs-package.html

There might be other ways but I am not familiar with them.

For more detailed documentation, you can read the "Debian New Maintainers'
guide" (apt-get install maint-guide).

hth
raju

-- 
Kamaraju S Kusumanchi
http://www.people.cornell.edu/pages/kk288/
http://malayamaarutham.blogspot.com/



Reply to: