[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [HOWTO?] Splitting one upstream package into several .debs



dh_make has a multi-binary package option (m) that should get you started.

Basically you have one source package just like with a single binary
package.  In your debian/control file you have multiple paragraphs, one
for each binary package.  

The debhelper tools will act on each of the packages you define
seperately.  Where they need a specific filename (i.e. dh_installdirs
looks for a file called dirs) you just prefix the package name to the
filename (i.e. package1.dirs package2.dirs). Omit the prefix for files
that should be in all the derived binary packages (i.e. changelog,
copyright.)  If there is an action in your rules file which only needs to
be performed on one package, the debhelper tools take a -p or
--package parameter which is followed by the name of the package.  (e.g.
dh_installinfo --package=package1 will only install info docs for
package1.)

You compile and install your package in debian/tmp as usual.  Then you
create subdirectories in debian/tmp for each of your binary packages and
use dh_movefiles to move them from tmp to the right places (i.e.
debian/tmp/usr/bin/prog to debian/package1/usr/bin/prog)

That's basically it!

-- 
Jaldhar H. Vyas <jaldhar@braincells.com>

On Wed, 3 Feb 1999, Sudhakar Chandrasekharan wrote:

> I am in the process of packaging aspell (and gaspell - a gtk front end
> to aspell).  When I take a virgin upstream source and package it up
> (using dpkg-buildpackage) I get one huge Debian package.
> 
> Here is a listing (edited for brevity) of the contents of the package -
> 
> $ dpkg --contents 
> drwxr-xr-x root/root         0 1999-02-03 11:01 ./
> drwxr-xr-x root/root         0 1999-02-03 11:01 usr/
> drwxr-xr-x root/root         0 1999-02-03 11:02 usr/bin/
> -rwxr-xr-x root/root    123836 1999-02-03 11:02 usr/bin/aspell
> -rwxr-xr-x root/root        57 1999-02-03 11:02 usr/bin/run-with-aspell
> drwxr-xr-x root/root         0 1999-02-03 11:01 usr/doc/
> drwxr-xr-x root/root         0 1999-02-03 11:02 usr/doc/aspell/
> drwxr-xr-x root/root         0 1999-02-03 11:01 usr/doc/aspell/man-html/
> -rw-r--r-- root/root      6382 1999-02-03 11:01
> usr/doc/aspell/man-html/1_Introduction.html
> -rw-r--r-- root/root     12302 1999-02-03 11:01
> usr/doc/aspell/man-html/2_Getting.html
> .
> .
> .
> -rw-r--r-- root/root      5405 1999-02-03 11:01
> usr/doc/aspell/man-html/D_Glossary.html
> -rw-r--r-- root/root     35024 1999-02-03 11:01
> usr/doc/aspell/man-html/E_Copyright.html
> -rw-r--r-- root/root     11340 1999-02-03 11:01
> usr/doc/aspell/man-html/index.html
> -rw-r--r-- root/root     11340 1999-02-03 11:01
> usr/doc/aspell/man-html/manual.html
> drwxr-xr-x root/root         0 1999-02-03 11:02 usr/doc/aspell/man-text/
> -rw-r--r-- root/root      3760 1999-02-03 11:01
> usr/doc/aspell/man-text/3_Aspell.txt.gz
> .
> .
> .
> -rw-r--r-- root/root     11668 1999-02-03 11:01
> usr/doc/aspell/man-text/E_Copyright.txt.gz
> -rw-r--r-- root/root     30319 1999-02-03 11:02
> usr/doc/aspell/manual2.lyx.gz
> -rw-r--r-- root/root      1664 1999-02-03 11:02
> usr/doc/aspell/manual.aux.gz
> -rw-r--r-- root/root      3621 1999-01-04 02:22 usr/doc/aspell/README.gz
> -rw-r--r-- root/root       626 1999-02-03 10:50
> usr/doc/aspell/README.Debian
> -rw-r--r-- root/root       559 1999-02-03 10:49 usr/doc/aspell/copyright
> -rw-r--r-- root/root     29868 1999-02-03 11:02
> usr/doc/aspell/manual.tex.gz
> -rw-r--r-- root/root     44986 1999-02-03 11:02
> usr/doc/aspell/manual.dvi.gz
> -rw-r--r-- root/root       224 1999-02-03 10:29
> usr/doc/aspell/changelog.Debian.gz
> drwxr-xr-x root/root         0 1999-02-03 11:02 usr/lib/
> -rw-r--r-- root/root    445920 1999-02-03 11:02
> usr/lib/libaspell.so.0.0.0
> lrwxrwxrwx root/root         0 1999-02-03 11:01 usr/lib/libaspell.so.0
> -> libaspell.so.0.0.0
> lrwxrwxrwx root/root         0 1999-02-03 11:01 usr/lib/libaspell.so ->
> libaspell.so.0.0.0
> -rw-r--r-- root/root       479 1999-02-03 11:01 usr/lib/libaspell.la
> -rw-r--r-- root/root   3050682 1999-02-03 11:02 usr/lib/libaspell.a
> drwxr-xr-x root/root         0 1999-02-03 11:02 usr/lib/aspell/
> -rwxr-xr-x root/root        23 1999-02-03 11:02 usr/lib/aspell/ispell
> -rw-r--r-- root/root   1027782 1999-02-03 11:02
> usr/lib/aspell/english.wrd
> -rw-r--r-- root/root    704197 1999-02-03 11:02
> usr/lib/aspell/english.sl
> drwxr-xr-x root/root         0 1999-02-03 11:02 usr/include/
> -rw-r--r-- root/root      3895 1999-02-03 11:02 usr/include/aspell.hh
> -rw-r--r-- root/root      4495 1999-02-03 11:02
> usr/include/const_string.hh
> -rw-r--r-- root/root      2221 1999-02-03 11:02
> usr/include/as_convert.hh
> -rw-r--r-- root/root      1638 1999-02-03 11:02 usr/include/as_check.hh
> -rw-r--r-- root/root       648 1999-02-03 11:02 usr/include/as_error.hh
> -rw-r--r-- root/root      1852 1999-02-03 11:02
> usr/include/as_mwordlist.hh
> -rw-r--r-- root/root      8354 1999-02-03 11:02 usr/include/as_data.hh
> 
> 
> I don't like the idea of creating one huge package.  I was thinking of
> splitting this into aspell.deb (which contains the binaries),
> aspell-dev.deb (containing the libs and include files) and aspell-doc
> (containing the .tex, .dvi, .txt and .html documentation).
> 
> So here is the question -
> 
> Do I have to create each package seperately (ie. tar zxvf
> upstream_src.tgz, dh_make, edit, dpkg-buildpackage in each case)?    Can
> someone point me to another *simple* package that is split downstream
> like this?
> 
> Thaths
> -- 
> Lisa:  Why are you dedicating your life to blashphemy?
> Homer: Don't worry sweetheart.  If I am wrong I'll recant on my
>        deathbed.
> Sudhakar C13n   http://people.netscape.com/thaths/   Indentured Slave
> 
> 
> --  
> To UNSUBSCRIBE, email to debian-mentors-request@lists.debian.org
> with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
> 




Reply to: