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

Re: Packaging library examples (binaries/source)



Gavin Baker <gavinb@antonym.org> writes:

> Hi,
>
> I am working on packaging a fairly large library.  Along with the main
> tarball comes a bunch of example programs.
>
> I intend to provide a libfoo-examples package, which would include both
> the source and the binaries of these example programs (which the user
> would reasonably expect).
>
Well, normally example binaries are not shipped, since they usually
provide no real functionality.

> According to policy:
>
> 13.6: [...] If the purpose of a package is to provide examples, then the
> example files may be installed into /usr/share/doc/package
>
> So is it reasonable to put the sources (C++) into
> /usr/share/libfoo-examples/src and likewise the prebuilt binaries into
> /usr/share/libfoo-examples/bin?
>
> If not, what is the preferred way?
>
Current practice seem to be to put the example sources into
/usr/share/doc/<package>/examples (along with a Makefile, possibly)
and don't ship binaries.

> Part II:
>
> This library also has some sample applications (more sophisticated than
> the simple examples mentioned above) that come in a separate tarball. 
> The purpose of these apps is twofold: a) to show how to build complete
> apps with this library, and b) to be useful in their own right (eg. data
> viewing and conversion).
>
> Given this, it seems it would make sense to treat the package as an
> "extended examples" package and have a /usr/share/libfoo-apps/{bin|src}
> just like above.  Right?
>
> However - some of these apps are useful in their own right (such as a
> data viewer or conversion tool).  Is it ok to place a symlink from
> /usr/bin to /usr/share/libfoo-apps/bin so that users can invoke these
> apps directly?
>
I'd go for just putting them into /usr/bin (watch out for namespace
collisions/pollution, though) and not install the source at all. A
user needing the source could always 'apt-get source libfoo-apps'.

Just my 4 €-cent...

HTH, Andy
-- 
Andreas Rottmann         | Rotty@ICQ      | 118634484@ICQ | a.rottmann@gmx.at
http://www.8ung.at/rotty | GnuPG Key: http://www.8ung.at/rotty/gpg.asc
Fingerprint              | DFB4 4EB4 78A4 5EEE 6219  F228 F92F CFC5 01FD 5B62

It's GNU/Linux dammit!



Reply to: