[aur-general] How to depend a pkg on two alternative packages?
Mauro Santos
registo.mailling at gmail.com
Sat Mar 14 17:06:13 UTC 2015
On 14-03-2015 15:09, Uwe Koloska wrote:
> Hello,
>
> I want to create a package for an app that needs either pyaudio or (as
> an alternative) pygame. How can I write this in the PKGBUILD?
>
> And what's more: The main dependency pyaudio is "only" in AUR but the
> alternative "pygame" is part of the official repos.
>
> For now, I don't know when the app decides what package to use. So I
> see three ways to do it:
>
> * make both packages alternatives in the depends-array (but how?)
>
> * make pygame a hard dependency (because it is an official package) and
> pyaudio an optional one
>
> * make both optional and write a message to .install, that at least one
> of them has to be installed ...
>
>
> Could you help me?
> Uwe
>
If I'm not wrong, what you want is done with the provides array. Both
pyaudio and pygame would need to "say" they provide something in common.
When a user installs your package, pacman will prompt to install one if
needed.
Example:
package one
name: fast food place
provides: food
package two:
name: fancy cuisine restaurant
provides: food
package three
name: super duper food chain
requires: food
When you want to install super duper food chain you will be prompted to
install either fast food place or fancy cuisine restaurant if neither is
installed.
--
Mauro Santos
More information about the aur-general
mailing list