"deb-src http://host/debian distribution section1 section2 section3" like this.
2. apt-get update
3. apt-get source
This will download three files: a .orig.tar.gz, a .dsc and a .diff.gz. In the case of packages made specifically for Debian, the last of these is not downloaded and the first usually won't have "orig" in the name.
The .dsc file is used by dpkg-source for unpacking the source package into the directory packagename-version. Within each downloaded source package there is a debian/ directory that contains the files needed for creating the .deb package.
To auto-build the package when downloaded, just add -b to the command line,
4. apt-get -b source packagename
If you decide not to create the .deb at the time of the download, you can create it later by running:
5. dpkg-buildpackage -rfakeroot -uc -b
Now you can see the .deb file of that particular package.
From within the directory that was created for the package after downloading. To install the package built by the commands above one must use the package manager directly,
6. dpkg -i file.deb
Note: Don't Forgot to install the needed Dependences