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

Re: Some questions

On Tue, Mar 01, 2005 at 04:34:44PM +0100, Lars Roland wrote:
> Hi 
> This may be newbie questions, but anyway here goes: We have a
> commercial system, that we are planing to make available open source
> (GPL) - right now the plan is to have deb packages and tgz files for
> the installation. The tgz installation can be broken into
(Good; NRAO AIPS++ source is available only as RPM)..

>  a) Executable files
>  b) Database files (eg. *.sql files for generating tables)
>  c) Documentation
> In order to make updating smooth, it would be nice if this separation
> could be kept, thus I would like to create 3 packages
>  mysoftware               # Contains the executables
>  mysoftware-db           # Contains the database scripts
>  mysoftware-doc         # Contains the documentation
If -db is just db scripts, then they should be included in the
mysoftware pacakge (since they will be pretty small, and are needed in
postinst; see below).  They should be installed into

> My questions are
> 1) How do I create a deb package that just drops the documentation in
> a given directory (eg. it is pure html doc so no man pages are
> created). I have read as much documentation about the process of
> making debian packages, and all of it seams evolve around turning
> software that is installable by normal GNU procedures in to a debian
> package. Normally our software is installed by a script and removed by
> another script. So I am wondering if anyone has some pointers to
> documentation that explains how to write a deb package from scratch
> without usin the helper tools (as these tools does not seam fit our
> installation procedure).
Lots of software doesn't follow the GNU procedure; its just that the
GNU procedure is one of the most common ones.  All you have to do is
to install the files to a subdirectory of ./debian/ named after the
package you want those files to appear in.  So,
./debian/mysoftware-doc/usr/share/doc/mysoftware-doc/.  You can just
use cp -r in ./debian/rules, though there are more elegant ways using
dh_install or dh_installdoc.

> 2) When you update the database software from, say, version 1.0 to 1.1
> then it would be preferable to NOT generate all the tables again (that
> is, mysoftware-db 1.1 should just alter or extend the tables that
> mysoftware-db 1.0 created). Can I somehow create a package that
> depends on earlier versions of itself ? - or is there some other
> scheme that is used when you are in a situation where software depends
> on earlier versions of itself ?.
I believe you should use the postinst script; it will have to check
the version numbers, and manipulate the databases appropriately.

Probably something like:

	if (upgrading from version < 1) add this column
	if (upgrading from version < 2) also add this column

FYI: The debian-women project on alioth recently had a good
description of how the maintainer scripts are called.


Reply to: