A web application has no make file unlike C++ or anything like that. However, it needs to be placed into specific directories...e.g /var/www. 

I'm new to linux packaging, so my question is, how do I package my app into a .deb such that when its being installed, it gets put into something like /etc/myprogram/bundles/myprogram-3.4? Mine in particular is a java app running on apache tomcat.

I've managed to create a .deb file by reading painstakingly every word in <http://www.debian.org/doc/manuals/maint-guide>. However when I follow the instructions I end up getting 

1) a .deb file that is 1.7kb instead of the ~240mb that it should be, because apparently it is lacking all my source code.
2) confused because I don't know whether I was supposed to write some sort of makefile. I am not even sure where to go about learning the answer to that question, and then I'd have to deal with how to write a makefile.

I've posted a similar question to ubuntuforums, but I feel like I'm more likely to get a response here.