dub and debian packaging

Mathias Lang via Digitalmars-d digitalmars-d at puremagic.com
Mon Jan 25 17:24:59 PST 2016


2016-01-25 18:08 GMT+01:00 ikod via Digitalmars-d <
digitalmars-d at puremagic.com>:

> Hello
>
> I'd like to hear any opinions and best practices on coexistence of dub and
> debian .deb packaging and deployment.
>
> Here is my problem: I wrote some small library that use Pegged to parse
> and process user requests. This library can be  used in shebang-scripts on
> servers or can be statically linked to applications. The first case require
> library code and dependencies (Pegged in this case) be deployed on servers
> to some well-known system-wide place like /usr/include/d/ so that any
> developer can simply use line like '#!/usr/bin/rdmd --shebang
> -I/usr/include/d` in his script.
>
> And here is a problem: we (like many other) distribute our software over
> our debian-based machines using standard debian packaging system. There is
> no problem for me to wrap my library into .deb. The question about Pegged
> or any other dub-based D library - how do you think, what is better way to
> tie together dub and deb-packaged software?
>
> Should I use some postinstall scripts to fetch-build-deploy Pegged to
> /usr/include/d/ using dub, or should I wrap Pegged in separate .deb and
> include it dependencies in my library or any other package relying on
> Pegged? For me the latter way is better/ but what is your opinion?
>
>
`dub` is primarily meant for development.
You most likely want to compile the binary, and distribute it this way.
There are some additional advantages, for example you don't have to care
about the compiler version installed on the server anymore (you don't need
any), and it is most likely to save ressources, as, AFAIK, Pegged is quite
template-heavy and if you go into complex expression DMD will just eat your
whole memory.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20160126/f87dcab3/attachment-0001.html>


More information about the Digitalmars-d mailing list