Building Debian packages from package sources

apt-get build-dep package_name
apt-get source package_name
cd package_name

<modify source>

dpkg-buildpackage -us -uc -nc

Open issue: Package version should be changed.

Second variant:

apt-get build-dep package_name
apt-get source package_name
cd package_name

<modify source>

dpkg-source --commit

dpkg-buildpackage --unsigned-source --unsigned-changes