Just a few suggestions, I'm sure you won't mind.
(Note that in this guide I won't go much into details. Consult Maintainers Guide for more than a dirty little guide. :))
I want to have a control over what's installed on my system. How do I create a package instead?
First, install everything as mentioned by flygmaskin, especially -dev packages. For ALSA support install libasound2-dev and for debianizing sources debmake:
sudo apt-get install libasound2-dev debmake
Follow flygmaskin's steps till number three. Instead of running ./configure, make, make install, run following:
A small dialog will appear asking you for a type of a package you want to create. Answer s for a single binary. Take a look at the debmake manpages to see more options.
This will create debian directory with some files inside bmp sources.
(There're more files out there but we'll take a look at the two mentioned above).
-rw-r--r-- 1 pef pef 426 2004-11-13 14:21 control
-rwxr-xr-x 1 pef pef 1347 2004-11-13 14:25 rules
is used for providing basic but essential information about the package. As you may see, this file controls dependencies as well.
* 14:39:25 * pef @ agonicus *
[~/src/beep-media-player-0.9.7rc2] > cat debian/control
Description: Versatile audio player that supports Winamp skins
A player that supports Winamp skins, with a customizable interface based on
GTK2. It has various output plugins and can read various audio formats.
Because we are creating a single, little package in our example, we will leave it as it is. Just type something meaningful into the description and section field. Feel free to use lines used above, they are taken from the official package anyway.
Again, I won't explain much about this file, consult Maintainers Guide for a full info.
* 14:41:09 * pef @ agonicus *
[~/src/beep-media-player-0.9.7rc2] > cat debian/rules
# Made with the aid of debmake, by Christoph Lameter,
# based on the sample debian/rules file for GNU hello by Ian Jackson.
$(MAKE) CFLAGS="-O2 -g -Wall"
Let's take a look at the build section as seen above. There's is a single parameter given to the ./configure script, --prefix. But we want more options to be included in the package so run ./configure --help to see all.
(This list is quite long so I won't post it here)
* 14:49:33 * pef @ agonicus *
[~/src/beep-media-player-0.9.7rc2] > ./configure --help
`configure' configures bmp 0.9.7rc2 to adapt to many kinds of systems.
Now go back to your rules file, section build and edit it like this:
(note that some/all options may be used by default, I just added them to be sure it will compile the way I want to)
./configure --prefix=/usr --enable-gconf --enable-gnome-vfs --enable-one-plugin-dir
Save the file and proceed to the final step:
As usual, feel free to take a look at the manpages of the dpkg-buildpackage command.
sudo dpkg-buildpackage -D -uc
Now you should have the package beep-media-player_0.9.7rc2-1_i386.deb/ bmp_0.9.7rc2-1_i386.deb (depends on how did you unpacked the sources) in .. created. Install using dpkg and pat yourself on the back. Mission accomplished. :)