views:

129

answers:

1

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.

+1  A: 

The build tool for Java programs is ANT. With ANT you build a WAR file and deploy that to Tomcat.

Here is a brief glimpse at how it looks: http://javabeanz.wordpress.com/2009/02/12/how-to-create-a-war-file-using-ant/
and here is a tutorial on building a war file with ANT: http://techtracer.com/2007/04/16/the-great-ant-tutorial-a-great-jump-start/

Romain Hippeau
I understand how to build java programs, but I don't understand how to package a web application written in Java for ubuntu
Sam
@Sam I am not implying that you do not know how to write Java. All I am saying is that the proper tool to create a WAR file and deploy it to Tomcat is ANT. look at the links I posted and ask any questions on this site to help you move along
Romain Hippeau
Thanks Romain, I found my answer elsewhere. My application is bundled with Tomcat, and it's already compiled so I just had to package binaries for ubuntu, as opposed to compile from source. There was no need for ANT (that's only if you need to compile from source).
Sam
@Sam - I am glad you found an alternate path. This would still work. ANT allows you to package as well as compile.
Romain Hippeau
Interesting, I will look into this. Thanks!
Sam