middle of the night, i am just shooting, don't take my word for it:
You download a tarball. That's called the upstream version.
You unpack it, that is called the source directory.
You cd to the source directory.
To use dpkg-buildpackage the source directory needs to contain a debian/ directory
Inside the debian directory (inside the source directory) you will find certain files which contain important information. The most important ones are debian/control, debian/copyright and debian/changelog (but there are more, those three are the ones you usually have to edit).
To make the story short: Install dh-make, cd to the source directory, run dh_make and edit the according files (control, including the dependencies, is the most important one. copyright and changelog are only to do it the right way, being debian complient).
There is a quick how-to at the mepis wiki and there is a quick tutorial by SoulSinging, sticky, at forums debian net), there is also a pdf file by stevepusser, but i ain't got the link. All three should get you started for private usage. There are more elaborate tutorial at wiki.debian.org. I just ran into this how-to, which is a quite big overview:
========= SCRAPER REMOVED AN EMBEDDED LINK HERE ===========
url was:"http://www.debian.org/doc/manuals/packaging-tutorial/packaging-tutorial"
linktext was:"http://www.debian.org/doc/manuals/packa ... g-tutorial"
====================================
packaging-dev is a metapackage which contains all but the kitchen sink to build packages.
Once you think you got the main idea, get the head into lintian (to make the packages lintian clean, check for problems in copyright and changelog, etc)
You don't need to and you shouldn't build packages as root. Look at fakeroot (in case needed, but i don't think it is. Not sure myself).
Best practise is some form of chroot environment to build packages (for example pbuilder). pbuilder will also make sure that you got the dependencies right in debian/control.
Short version:
Either go for the checkinstall path, mentioned by rokytnji, or install dh-make and use it to create a debian/ directory, then use dpkg-buildpackage.
If dpkg-buildpackage complains about missing dependencies run
as root. Then run dpkg-buildpackage again
I'd like to finally be able to install stuff that requires dependencies. I was trying to install software-center on the Debian pc, but it wouldn't work due to lack of dependencies. So basically I'd have to install the dependency of the dependency to first then work my way to software-center?
What packages do we speak of? If you install packages with software-center, synaptic, apt-get or aptitude, all dependencies should be available (should be means: _are_. If someone packages x, and y and z are dependencies, he will first package y and z, then x, then upload all to the debian archives. _Then_ they are listed by any of the frontends, say"apt-cache search x").
I was trying to install software-center on the Debian pc,
That one?