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

Re: creating a debian package that doesn't require compiling...



Jeremy Higgs <jhiggs@iprsystems.com> wrote:

[Moving to the debian-mentors mailing list - "Helping newbie
developers".]

>I am trying to create a debian package for RCF (a firewall for 
>linux). There is currently a tarball and RPM of the firewall, but not 
>a debian package, so I thought I might try and make one!

Always useful :)

>The main file (rc.firewall) is placed into /etc/rc.d/, and the config 
>file in /etc. There are also some .tar files that are contained in 
>the rcf tarball that are uncompressed and put into directories within 
>/etc/firewall/.
>
>I have read the maintainer's guide that is at the Debian 
>Documentation Project, but it seems to only cover packages that 
>require compiling - which RCF doesn't.
>
>After running dh_make and cd'ing to the debian directory, is there a 
>file that allows you to tell dpkg (or whatever is handling the 
>package) to put certain files into certain places, and/or do certain 
>things? I've looked at the debian/rules files, but that refers to 
>compiling from source, and I don't need that!

Just leave out the bits that refer to compiling; packages that don't
require this are just an easier subset. The 'install' target of
debian/rules (or the 'binary-indep' target - 'install' isn't required,
but is often present and is probably in the examples you have) installs
files into debian/tmp [1]. You're likely to have a build target that
does nothing, an install target that installs the configuration file in
debian/tmp/etc and uncompresses the tarballs into
debian/tmp/etc/firewall, and, since you're using dh_make, a binary-indep
target that runs lots of debhelper programs to build the rest of the
package, including dh_installinit which will install rc.firewall in the
right place given suitable prodding.

[1] If you're using debhelper with DH_COMPAT=2, use debian/rcf or
    whatever instead of debian/tmp.

Beware of Debian being different from Red Hat-derived distributions; we
use /etc/init.d rather than /etc/rc.d/init.d, and expect packages with
initialization scripts to use update-rc.d.

As well as the New Maintainer's Guide, you should read the Packaging
Manual, which will probably go a long way to answering other questions
you may have.

Cheers,

-- 
Colin Watson                                     [cjw44@flatline.org.uk]



Reply to: