Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

Fedora, FreeBSD, OS X (Homebrew, MacPorts), Ubuntu, Debian, and others all use different packaging systems for binary and source distribution.

When I develop a new application I want to make it available to as many users as possible right out of the gate. But learning all the different packaging tools and conventions is a lot of work. I can manage, but there has to be an easier way.

Is there a super-tool that I should be aware of that can be used to ease the overhead of maintaining and learning all these packaging systems?

share|improve this question
    
Just script the packaging process for yourself on a per application basis. –  TAFKA 'goldilocks' Jan 2 '13 at 16:32
1  
fpm : github.com/jordansissel/fpm - works like a charm for a decent subset of the systems you cite (builds RPMs and debs). Agree with @goldilocks, though; the starting point would be the good ole' autotools-based source tarball. –  Deer Hunter Jan 2 '13 at 19:54
    
Another quick & dirty way to get deb, rpm and Slackware packages from a source-based install is using checkinstall (but the Open Build Service could be handy here, too, as it gets you packages for various rpm-based distributions and Debian) –  sr_ Jan 3 '13 at 8:14
add comment

3 Answers

You might consider fpm which is a tool to help build packages for all the different packaging formats easily.

share|improve this answer
add comment

The easy way is to provide a source archive and let distribution maintainers make packages for their own distribution.

You can easily make a plain binary archive (.tar.gz) and convert it to a .deb and to a .rpm, which will cover most Linux users, but it won't be as useful as a properly-made package. Getting the binary archive in the right format is only the tip of the iceberg. Making a good package requires, among others:

  • Placing the files in the appropriate directories. While the FHS attempts to unify the Linux directory structure, there is still variation between distributions.
  • Compiling against the right versions of libraries. How difficult this is depends on whether your program depends on libraries whose ABI evolves quickly. Different releases of the same distribution may require different packages because they ship with different library versions.
  • Declaring dependencies with the right package names.
  • Declaring menu entries, MIME handlers, documentation, startup scripts, …

It's generally easier to let someone who is familiar with each distribution make a package. Often you'll be able to gather these contributions into a single source package (containing a debian directory, a .spec file for rpm, …), and distribute source archives, then let people who run each distribution make a package for their distribution. Unless you've made major changes to your program, it's likely that once you get a particular distribution working, newer versions will just work with the same build scripts.

Some distributions have automated mechanisms to build and distribute packages. For example, you can make an Ubuntu PPA and have it automatically built against all supported Ubuntu releases, even if you aren't running Ubuntu.

share|improve this answer
add comment

My suggestion is learn them. It's not that difficult and there have been a lot of automation in building them and it provides native way for systems to tell the use what they actually have installed..

Having said that there are many options:

  1. RPM can be compiled from source and many systems provide natively compiled ports of the tool
  2. APT is also available for some of the OS' you have listed.
  3. Self-Extracting Shell Archive which basically requires a tar ball of your distribution and some post configuration scripts.
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.