Thank you for your reply.
This what I did in the end:
Code:
scons -j 2 prefix=/usr datadir=share/games/vdrift/data release=1 arch=i686 localstatedir=/var sysconfdir=/etc || return 1
mv $startdir/src/$pkgname-$pkgver/build/vdrift $startdir/src/$pkgname-$pkgver/build/vdrift.back
scons -j 2 install prefix=$startdir/pkg/usr datadir=share/games/vdrift/data
mv $startdir/src/$pkgname-$pkgver/build/vdrift.back $startdir/pkg/usr/bin/vdrift
I realised that after the first scons command the datadir was correctely set but after the second scons command the vdrift binary was compiled again and this time the datadir was set to $startdir/pkg/usr/share/games/vdrift/data.
Maybe there is a more elegant solution, but this one works :wink: