2346
Comment:
|
2383
"look at the dsc file or get the relevant files through"; distinguish command lines from output
|
Deletions are marked like this. | Additions are marked like this. |
Line 27: | Line 27: |
From your web browser at http://packages.debian.org/sid/mame, look at the dsc file or: | From your web browser at http://packages.debian.org/sid/mame, look at the dsc file or get the relevant files through: |
Line 36: | Line 36: |
cd mame-0.142 grep Build-Depends debian/control |
$ cd mame-0.142 $ grep Build-Depends debian/control |
Line 39: | Line 39: |
su -c "apt-get install debhelper libexpat1-dev libsdl1.2-dev zlib1g-dev libxinerama-dev libgconf2-dev libgtk2.0-dev libsdl-ttf2.0-dev" | $ su -c "apt-get install debhelper libexpat1-dev libsdl1.2-dev zlib1g-dev libxinerama-dev libgconf2-dev libgtk2.0-dev libsdl-ttf2.0-dev" |
Translation(s): English - Français - Italiano - Русский
Here we take the example of the package mame, which exists in Debian Sid, but not in the stable release. If the package you're looking for not available in Sid, but in a Ubuntu PPA, you can have a look at CreatePackageFromPPA.
We don't need to be root here except the first and last steps.
Install Debian SDK
su -c "apt-get install devscripts build-essential debian-keyring"
Find which version is available in the debian archive
rmadison mame --architecture amd64 mame | 0.146-5 | wheezy/non-free | amd64 mame | 0.146-5 | jessie/non-free | amd64 mame | 0.146-5 | sid/non-free | amd64 mame | 0.148-1 | experimental/non-free | amd64
Download the .dsc file from the sid release
From your web browser at http://packages.debian.org/sid/mame, look at the dsc file or get the relevant files through:
dget -x http://ftp.de.debian.org/debian/pool/non-free/m/mame/mame_0.142-1.dsc
Install dependencies as found in debian/control
$ cd mame-0.142 $ grep Build-Depends debian/control Build-Depends: debhelper (>= 8), libexpat1-dev, libsdl1.2-dev, zlib1g-dev, libxinerama-dev, libgconf2-dev, libgtk2.0-dev, libsdl-ttf2.0-dev $ su -c "apt-get install debhelper libexpat1-dev libsdl1.2-dev zlib1g-dev libxinerama-dev libgconf2-dev libgtk2.0-dev libsdl-ttf2.0-dev"
Indicate in the changelog a backport revision number
dch --local ~bpo70+ --distribution wheezy-backports "Rebuild for wheezy-backports."
This will add something like ~bpo70+ to the package version number. The tilde ~ makes the package inferior in version, which should allow a proper package upgrade when you upgrade to the next debian release (ie your package will be replaced with the official debian package)
Test if we can successfully build the package
fakeroot debian/rules binary
Build a package properly , without GPG signing the package
dpkg-buildpackage -us -uc
Install and enjoy !
su -c "dpkg -i ../mame_0.142-1_amd64.deb"