Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I've started creating a .deb package for my software a while back and the method I've stumbled upon then (I knew nothing about the domain) basically is like this:

  • create a directory structure like this
-- pkg-dir
   -- DEBIAN
      -- controlfile
      -- postinst
      -- postrm
      -- conffiles
   -- usr
      -- share
         -- myapp
   -- etc
      -- myapp
  • fakeroot dpkg-deb --build pkg-dir
  • lintian pkg.deb

However these days the info I'm finding all point to dh-make. Is dh-make the new or preferred way? Where does my method come from? I'd like to use the standard way in future but for now I'd like to finish what I've started using this as I'm pressured for time. Where do I get more info on my method?

share|improve this question
1  
This is the official Ubuntu packaging guide: developer.ubuntu.com/packaging/html –  saji89 Nov 15 '12 at 8:38
    
Are you intending to build a package targeting Ubuntu or upstream(Debian itself)? –  saji89 Nov 15 '12 at 8:51
    
Actually I'm busy packaging our company's Java app, so its a commercial App... but I also wan't to distribute my own open-source apps later. Mainly Ubuntu at this stage but keeping options open for upstream would be better. –  Hannes de Jager Nov 15 '12 at 9:57
    
I guess my learning curve is a bit steeper because I'm packaging a commercial App as most examples is for open-source obviously and leveraging the repository system that is not available to commercial apps (I think). Any tips on packaging a commercial app would be appreciated. I'm passionate about Linux and would love to see our commercial software integrate best it can with Linux so I'm driving the effort, but there's lots to learn –  Hannes de Jager Nov 15 '12 at 10:04
add comment

2 Answers 2

up vote 2 down vote accepted

You can create Debian packages in several ways. dh- tools are helperscripts to aid you in creating the correct directory structure and files. dh-make is the most basic one, yet has a lot of heuristic and works well with software using the GNU autotools (the ./configure, make, make install ones). It will do a lot of work for you.

Then you can use debuild to create a source and binary package.

"Your way" is just building from binary files. This is unwanted, as you can't build for other distributions (releases) or architectures. Also, Debian/Ubuntu requires to have a source package in order to be included in the repositories (along a lot of other requirements and guidelines). See for more information the links @saji89 povided. I also suggest you to download packages and inspect how they're put together, using apt-get source packagename.

Update

You mentioned later in a comment you're packaging a Java application. The Debian wiki on Java packaging mentions this:

Use of javahelper is not actually required, however implementing the required policy elements without javahelper is quite difficult, so it is assumed that you will be using javahelper.

So, I suggest to start reading about how to package using javahelper and DH, or the alternative to DH: CDBS.

share|improve this answer
    
Thanks for the overview. If I'm bundling a Java App? What tools would you suggest then? –  Hannes de Jager Nov 15 '12 at 10:07
1  
@HannesdeJager I suggest you to read the Debian wiki on Java/Packaging. –  gertvdijk Nov 15 '12 at 10:13
add comment

This is the official Ubuntu packaging guide:
http://developer.ubuntu.com/packaging/html

The information you want will be at: http://developer.ubuntu.com/packaging/html/packaging-new-software.html

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.