You are not logged in.
Hi, I would like to create a package depending on stepmania OR stepmania-svn.
Is it possible?
Or perhaps I can do something like that:
[…]
# Uncomment the following line if you have stepmania-svn
#_stepmania_svn=yes
depends=($(if [[ -nz $_stepmania_svn ]]; then echo stepmania-svn; else echo stepmania; fi) )
[…]
I don't know if this kind of trick is allowed in AUR.
Or I could ask the stepmania-svn maintainer to add the line
provides=('stepmania')
in the PKGBUILD, but I don't know if we can say that stepmania-svn provide stepmania.
Thank you,
Fractal
English is not my native language, so fell free to correct my mistakes.
Offline
I think the accepted approach for situations like this is to use the provides clause.
Offline
The second way is the proper one in my view. I say this b/c nearly all the -svn, -git packages I've seen provide their non-svn, non-git versions. Is there a reason you don't know if we can say that stepmania-svn provides stepmania?
//github/
Offline
The second way is the proper one in my view. I say this b/c nearly all the -svn, -git packages I've seen provide their non-svn, non-git versions. Is there a reason you don't know if we can say that stepmania-svn provides stepmania?
The svn version is in alpha stage and for example the package stepmania-extras will probably not work with stepmania-svn.
And some people probably want to have both packages installed, but I don't know if the "provides" line would disallow that.
Thank you for your answers, I will ask the maintainer of stepmania-svn to add a "provides" line.
Another little problem I have is that I have to know whether Stepmania is installed in /opt/stepmania or /opt/stepmania-svn (or both).
Can I do something like
if pacman -Qq stepmania-svn &> /dev/null
then
[…]
else
[…]
fi
or even
if ls /opt/stepmania-svn &> /dev/null
then
[…]
else
[…]
fi
in the build function?
Fractal
English is not my native language, so fell free to correct my mistakes.
Offline