5

I'm writing a D application which I want to package as a Debian package.

Does anyone know of a tutorial, or a skeleton package, to show me how to to do this for a D application?

Do I need to use autotools to build it?

Thanks,

Chris.

fadedbee
  • 42,671
  • 44
  • 178
  • 308

3 Answers3

3

IIRC, by default, D programs are stand alone; i.e. aside from system level .so dependencies (that shouldn't be included in the .deb) they have no dependencies. There are ways to make this not true but they are the exception. Consequently, a D 'hello world' binary, particularly from that standpoint of installing it, will look a lot like a C one.

The upshot of this is that, unless you are doing something strange, a C 'hello world' Debian package should be good enough to get you started.

BCS
  • 75,627
  • 68
  • 187
  • 294
2

If you know of any packaged D application, you can get the package's source:

apt-get source the-package-name

Provided that you added a deb-src entry in your sources.list.

Arnaud Le Blanc
  • 98,321
  • 23
  • 206
  • 194
  • 1
    Yes, this will work apart from D apps being extremely thin on the ground. If anyone knows the name of a Debian packaged D program, please let me know. – fadedbee Sep 06 '11 at 10:59
  • The package archive has a tag for "implementation language" but I got zero hits. Maybe that means there are none, or maybe that they have not been properly tagged. http://www.enricozini.org/2007/paper-debconf7/resources/ – tripleee Sep 07 '11 at 05:05
  • 1
    Oh, see also http://packages.debian.org/about/debtags#implemented-in::d -- there is currently no `implemented-in::d`. – tripleee Sep 07 '11 at 05:12
1

The source language of your project is rather unimportant. If it already has a Makefile, all you do in debian/rules is make install with the target paths set up where the packaging scripts expect (you might want to hack the main Makefile to support the DESTDIR installation prefix). I would recommend Debhelper et al.; then your job is basically to fill in the debian/README.Debian and debian/copyright files, and comment out unnecessary stuff from debian/rules.

tripleee
  • 175,061
  • 34
  • 275
  • 318