Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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: debian.org/doc/manuals/maint-guide/build.en.html –  Mitch Jul 24 '12 at 1:34

1 Answer 1

up vote 1 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. user@example.com

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 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 at 16:38

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.