3

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.

1

1 Answer 1

2

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. [email protected]

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.

4
  • Is it possible to set what folder to "dh_make" and "dpkg-buildpackage" use, without "cd"? Jul 28, 2012 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, 2012 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, 2014 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, 2014 at 16:38

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .