title: How to build a Debian/Ubuntu package from source?
body: <p>I have the source of a program (taken from cvs/svn/git/...) and I'd like to build a Debian/Ubuntu package for it. The package is present in the repositories, but:</p>
  
  <ul>
  <li>It is an older version (lacking features I need)</li>
  <li>I need slightly different compile options than the default.</li>
  </ul>
  
  <p>What is the easiest way of doing it? I am concerned about a couple of things</p>
  
  <ul>
  <li>How can I check if I have listed all the dependencies correctly? (I can get some hints by looking on what the older version depended, but new dependencies may have been added.)</li>
  <li>How I can I prevent the update system installing the older version in the repo on an update?</li>
  <li>How I can prevent the system installing a newer version (when its out), overwriting my custom package?</li>
  </ul>