Package creation in local pc

Method 1

TIP: Use fakechroot and fakeroot to root access.

Refer:

Lang: sh
fakechroot fakeroot debootstrap sid /tmp/debian/sid
fakechroot fakeroot chroot /tmp/debian/sid apt-get install -q hello
fakechroot chroot /tmp/debian/sid hello

Debian alternatives system

Lang: sh
# setup debian sensible browser using alternatives
sudo update-alternatives --install /usr/bin/x-www-browser x-www-browser \
  /usr/local/apps/chromium/latest/chrome 40
sudo update-alternatives --install /usr/bin/x-www-browser x-www-browser \
  /usr/local/apps/firefox/latest/firefox 20
update-alternatives --list x-www-browser
update-alternatives --query x-www-browser