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:
Code:
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.
[cut]
-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
[/cut]
(There're more files out there but we'll take a look at the two mentioned above).
control file:
* 14:39:25 * pef @ agonicus *
[~/src/beep-media-player-0.9.7rc2] > cat debian/control
Source: beep-media-player
Section: universe/sound
Priority: optional
Maintainer: <beep@seznam.cz>
Standards-Version: 3.5.8
Build-Depends: debmake
Package: beep-media-player
Architecture: i386
Depends: ${shlibs:Depends}
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.
is used for providing basic but essential information about the package. As you may see, this file controls dependencies as well.
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.
rules file:
Code:
* 14:41:09 * pef @ agonicus *
[~/src/beep-media-player-0.9.7rc2] > cat debian/rules
[cut]
#!/usr/bin/make -f
# Made with the aid of debmake, by Christoph Lameter,
# based on the sample debian/rules file for GNU hello by Ian Jackson.
package=beep-media-player
build:
$(checkdir)
./configure --prefix=/usr
$(MAKE) CFLAGS="-O2 -g -Wall"
touch build
[/cut]
Again, I won't explain much about this file, consult Maintainers Guide for a full info.
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.
Code:
* 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.
(This list is quite long so I won't post it here)
Now go back to your rules file, section build and edit it like this:
Code:
build:
$(checkdir)
./configure --prefix=/usr --enable-gconf --enable-gnome-vfs --enable-one-plugin-dir
(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)
Save the file and proceed to the final step:
Code:
sudo dpkg-buildpackage -D -uc
As usual, feel free to take a look at the manpages of the dpkg-buildpackage command.
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. :)
Bookmarks