Subject: Re: Alternatives in the same package
To: Mike M. Volokhov <mishka@apk.od.ua>
From: Geert Hendrickx <geert.hendrickx@ua.ac.be>
List: tech-pkg
Date: 04/20/2005 16:42:38
On Wed, Apr 20, 2005 at 02:51:07PM +0300, Mike M. Volokhov wrote:
> Hello!
>
> I'm working on package which contains two software implementation of
> the same program - wip/xmlformat. The program itself is a script
> written on Perl and Ruby languages. Users may choose preferred
> implementation dependly on what they have installed on their system -
> Ruby or Perl.
>
> I wish to support author's idea of bilingual script and provide pkgsrc
> users to select what they want to install. Seems there are two ways to
> do this.
>
> 1) Split package on three chunks - xmlformat-ruby, xmlformat-perl,
> xmlformat-docs. Latest package will contain only support documentation,
> independly what kind of script you use. The xmlformat-ruby and
> xmlformat-perl will be bounded together via PKGALTERNATIVES framework.
>
> 2) Use variable named, say, USE_LANG which may be set to "ruby" or
> "perl" at the build stage. Resulted package name may be also dependent
> on the selected value for USE_LANG. The conflicts will be also handled.
>
> Any opinion, how to create such packages?
I'd suggest to split the package up, so there will be "binary" packages
for both the perl and the ruby version.
pkg_alternatives aren't necessary as there is no need to have both
installed. It's not a matter of different interfaces (thus user
choice), just different dependencies (so only the sysadmin cares).
GH
--
:wq