I would like to create an Ubuntu package from a single bash script I wrote.

Is there a simple instruction how to build an Ubuntu package, that can be uploaded to launchpad? (I already created the PPA and uploaded my PGP- and SSH-keys).

I already created successfully a debian package (with Packages.gz and a PPA hosted at github itself) but that package is missing the needed files that are required in this Ubuntu manual: Uploading a package to a PPA:

  • .dsc
  • .changes
  • .diff.gz or .debian.tar.gz
  • and optionally the .orig.tar.gz (if you used debuild -S -sa to build your package)

How do those files have to look like and how do I create them? (examples, commandline tools?)

  • I don't know about simple, but I followed the links from your post to this article about building a package for Ubuntu : packaging.ubuntu.com/html Jul 9, 2014 at 15:06
  • The first paragraph there on 2. Getting Set Up already describes that you have to install pbuilder which installs some GB on your system, is this really needed for my case? (only one bash script is tested and that works well)
    – rubo77
    Jul 9, 2014 at 15:10
  • I'm gonna guess since pbuilder is the "package builder", that you will be better off if you do install it. Perhaps a package could be built by hand by someone with sufficient knowledge. Jul 9, 2014 at 15:12
  • You do not need pbuilder to make a .deb from a bash script, but it automates the process and interfaces with launchpad (your ppa). See askubuntu.com/questions/27715/… and packaging.ubuntu.com/html . There is no real replacement for reading the packaging guidelines if you wish to package a .deb "properly", meaning minimize problems for people who want to use your .deb . Also, without proper packaging, your .deb will never be accepted into the official repos.
    – Panther
    Jul 9, 2014 at 15:24
  • 1
    There a few files deemed essential while building a Debian package: debian/{changelog,compat,control,copyright,rules} and a few others. Most packaging tutorials talk about them. You can use the command dh_make -s -n will generate a set of sample files needed, which you can customize accordingly.
    – muru
    Jul 10, 2014 at 1:34


Browse other questions tagged .