Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I would like to create .deb files with no binary content (*.odt files, for example).

The idea is to create a file that contains didactic files to learn certain discipline and an automatically package downloader, to get needed packages for discipline learning. For example, C# *.pdf tutorials followed for the download of MonoDevelop (C# IDE), for C# programming classes.

share|improve this question
Take a look at this: – Mitch Jul 24 '12 at 1:34
up vote 2 down vote accepted

If the package do not publish in public space, but that is only for your own local use, you can make the deb package by the below steps.

In this example, Package name: doc-sample, Package version: 0.1, the final installing directory is /usr/share/doc/doc-sample/sample-docs.

Step1: Prepare directories to make the deb package.

The name of directory need to include version number.

mkdir -p doc-sample-0.1/sample-docs
cd doc-sample-0.1

Then, add the documents which you want to install , in doc-sample-0.1/sample-docs directory.

Step2: Prepare debian directory in default form.

Run the below command in doc-sample-0.1 directory.

dh_make -n -s -e (mail_address)

(mail_address): ex.

If it is the form of a mail address, it does not matter even if it is not the mail address actually used anything.

Step3: Remove unneccesary texts.

rm debian/*.ex debian/*.EX debian/README.Debian debian/README.source

Step4: Make the setting file named "(package_name).install" to install documents.

nano debian/doc-sample.install

Describe using the form: (documents_directory_name) space (install_directory)

sample-docs  usr/share/doc/doc-sample

When you install the final deb package, the sample-docs folder will install to /usr/share/doc/doc-sample directory in this case. (Caution: each files are compressed in .gz form)

Step5: Building deb package.

If you will build the deb package only for your own local use, you can skip promptings for the GPG signatures on the .dsc file and the .changes file.

Run the below command in doc-sample-0.1 directory.

dpkg-buildpackage -us -uc

So, you can get the deb package named doc-sample_0.1_i386.deb in upper directory.

If you want to publish in a public space (ex. PPA), you need to consider the license of a document, and sign the .dsc file and the .changes file by using GPG key.

For details, please refer to the documents for developers.

share|improve this answer
Thank you, worked like a charm =). – João Vinholi Jul 26 '12 at 17:48
Is it possible to set what folder to "dh_make" and "dpkg-buildpackage" use, without "cd"? – João Vinholi Jul 28 '12 at 2:37
The above description is premised on having changed the directory with cd doc-sample-0.1 at the first step. They can not use, unless using cd to the top directory of the project containing a version number. – vine_user Jul 28 '12 at 2:52
"(Caution: each files are compressed in .gz form)" How can you avoid the documents being compressed in .gz format? – landroni Apr 29 '14 at 6:29
Although it does not understand well, by this method(using dpkg-buildpackage command), I think that it will be installable only as the binary packages. – vine_user Apr 29 '14 at 16:38

Your Answer


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.