Differences between revisions 10 and 11
Revision 10 as of 2014-01-31 12:20:23
Size: 2677
Editor: BenArmstrong
Comment:
Revision 11 as of 2014-01-31 12:44:43
Size: 0
Editor: BenArmstrong
Comment: Teaches bad packaging practices; this is an evil hack that nobody should use
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
## page was renamed from Packaging/Trivial
#language en
~-[[DebianWiki/EditorGuide#translation|Translation(s)]]: English - [[fr/Packaging/Files|Français]] - [[it/Packaging/Files|Italiano]]-~
----

<<TableOfContents()>>


= Introduction =

This tutorial assumes starting with equivs is a valid way to teach packaging. But equivs is just a hack to circumvent package dependencies. Adding files to an equivs-based package is a hack on top of a hack that would not be used by a real package maintainer. To learn proper packaging, see [[IntroDebianPackaging]]. Otherwise, if you just want quick results and don't care if it's proper or not, read on.

Read how to [[CreateDummyPackage|create an empty package]], if you don't know
  * equivs-control, equivs-build
  * aptitude remove, aptitude show
  * dpkg -i p*.deb

We will now see how to make a package containing some files.

{{{#!wiki yellow/solid
Be aware that for free and open source software, you have to package with the data:
 * a copyright file
 * the source of the files

eg. LibreOffice files or TeX files can be the source for a [[PDF]] file
}}}

= files in /usr/share/doc =
Every package that is on your debian computer has a directory in /usr/share/doc/

In order to create a package to put files in this directory, here
  * README a text file
  * file.pdf a pdf file

the equivs-control file must be like :

{{{#!highlight console numbers=disable
$ more package-trivial-1.0
Package: package-trivial
Version: 1.0
Maintainer: a a <a@a.a>
Extra-Files: file.odt, file.pdf, README
}}}

The directory must contain these files :

{{{#!highlight console numbers=disable
$ ls
file.odt file.pdf package-trivial-1.0 README
}}}

= files in other directories =
In order to create a package to put files in this directory, here
  * README a text file in /usr/share/doc/package-trivial
  * file.odt which is the source of the pdf.
  * file.sh a text file in /root
  * file.pdf a pdf file in /var/tmp

the equivs-control file must be like :

{{{#!highlight console numbers=disable
$ more package-trivial-1.1
Package: package-trivial
Version: 1.1
Maintainer: a a <a@a.a>
Extra-Files: file.odt, README
Files: file.sh /root
 file.pdf /var/tmp
}}}

The directory must contain these files :

{{{#!highlight console numbers=disable
$ ls
file.odt file.pdf file.sh package-trivial-1.1 README
}}}

= What's next =

You can create a [[DebianRepository/HowTo/TrivialRepository|local repository]]

First read the excellent [[IntroDebianPackaging|Introduction to Debian Packaging]].

Return to [[Packaging|packaging]] if you seek more information.