What is the simplest Debian Packaging Guide?

153,112

Solution 1

This is a good HOWTO for creating a basic .deb file. It is suitable for creating .deb files for personal use but not stringent enough if you want to the package to be included in Debian / Ubuntu - for that you should read the Debian New Maintainer's Guide and/or the Ubuntu Packaging Guide (which I believe you've already tried).

A good tool for checking your .deb file for compliance is lintian (installable from the repositories).

There were two sessions here in the Ask Ubuntu chatrooms.

The Basics of Packaging on Ubuntu (Packaging: Part 1)

Ubuntu Packaging for Launchpad PPAs (Packaging: Part 2)

Solution 2

What parts are you having trouble with? Although complicated, the guide seemed quite clear when I was following it.

Quick Summary:

  • Extract source .tar.gz
  • Run dh_make
  • Edit debian files
  • Run debuild

Solution 3

You can even use dpkg-deb for creating simple packages.

Here's a nice tutorial from Ubuntuforums.

Solution 4

The very easiest way to package something is to use checkinstall.

Solution 5

No, the simplest and clearest packaging guide in this world is

Packaging Java Applications for Ubuntu and Other Debian's

Few days ago, for my first application, I created DEB package by following this tutorial. Very clear and my app packaged succesfully. Yes, at least it is simplest for me.

You can compare it with Debian Packaging Guide.

Share:
153,112

Related videos on Youtube

Geoff Cox
Author by

Geoff Cox

Dreamer.

Updated on September 17, 2022

Comments

  • Geoff Cox
    Geoff Cox over 1 year

    I went to the Ubuntu wiki but got confused,there were too many ways. Please tell me an easy guide to Debian packaging.

    • Admin
      Admin almost 14 years
      Do you want to create packages for your own use, on a specific computer, or for others to use?
    • Admin
      Admin almost 14 years
      Which language is the software you'd like to package?
    • Admin
      Admin over 8 years
      I have the same issue. Most of the tutorials and guides start with "get the upstream tarball". From this point on we are lost. We have a simple thing we want to deploy, there is no upstream tarball, there is no source code. its just a war file, some scripts, and some jar files. What is the upstream tar ball all about, and has anyone seen a guide NOT using one, which is comprehensive(e.g. deals with the issues of users)
    • Admin
      Admin over 8 years
      I'll go for the one I posted over StackOVerflow.
    • Admin
      Admin almost 5 years
      If you want to create "virtual packages" (group dependencies together), it is worth taking a look at equivs-build
  • João Pinto
    João Pinto almost 14 years
    checkinstall provides a quick way to build debin binary package(.deb ) from a source install method. However it does not provide a proper debian package (built from a debian source package).
  • Thomas Ward
    Thomas Ward almost 11 years
    "Simple" does not mean "complete". There's a lot of policies a basic .deb packaging tutorial will not cover for different types of programs, and therefore packaging is not as easy as just a "simple tutorial".
  • web.learner
    web.learner over 9 years
    What confused me is, is this process the same no matter the source language or directory structure?
  • Piotr Kula
    Piotr Kula about 9 years
    OH man.. I had to use that BEFORE compiling.. that's like hours of compiling.
  • John Little
    John Little over 8 years
    The crux is, we dont have a .tar.gz. we want to package an app we wrote. No guide seems to cover this, they all start with an "upstream tarball" which we dont have.
  • Nathan Osman
    Nathan Osman over 8 years
    @JohnLittle this answer may be of assistance: askubuntu.com/a/27731/5
  • atmelino
    atmelino over 8 years
    definitely simple. It got me started and I was able to create my first debian package within minutes. Still a lot of details to deal with (bad package quality messsages from lintian) but great starting point.
  • nightcod3r
    nightcod3r almost 7 years
    This nicely compiles what is needed to start with packaging, but in the HOWTO I miss information to include the application icon in the deb file (and haven't found anything about that elsewhere). Any hint on how to do it?
  • kravemir
    kravemir over 6 years
    What about long-term, repeated packaging? Do I have to every-time do such long and complicated packaging process?
  • agc
    agc over 6 years
    If the user has no GPG key, debuild will fail with "debsign: gpg error occurred! Aborting....".