Beginning with pacman 4.1, you can update the pkgver variable during a makepkg. pkgver() is run right after the sources are fetched and extracted.
pkgver()