As far as I know, you'll have to write the package version twice. The AUR reads the PKGBUILD's directly, not with bash (security concerns). Right now, the AUR only supports variables with the name only (i.e. $blah or ${blah}).
Regards, Xiao-Long Chen > Date: Tue, 20 Mar 2012 18:44:43 +0100 > From: m...@xbra.de > To: aur-general@archlinux.org > Subject: [aur-general] PKGBUILD with depending _pkgver > > Hi all, > > recently, I wrote an ebuild where pkgver=2.4.2 but in the download link > a 242 is needed. Thus, I decided to avoid any redundancy and to write > _pkgver="${pkgver//\./}". The PKGBUILD is working fine but > aur.archlinux.org is expanding the download link to "2.4.2//\./}". > > Is there a way to avoid both the redundancy and the wrong interpretation > at aur.archlinux.org? > > This is the package we are talking about: > https://aur.archlinux.org/packages.php?ID=34230 > > Kind regards, > Max