#Maintainer: Gabriel Margiani (gamag) #Contributor: matthiaskrgr pkgname=widelands-bzr pkgver=r7282 pkgrel=2 pkgdesc="A realtime strategy game with emphasis on economy and transport - development version" arch=(i686 x86_64) license=('GPL2') depends=('glew' 'sdl2_image' 'sdl2_mixer' 'sdl2_net' 'sdl2_ttf') makedepends=('bzr' 'cmake' 'python' 'boost') provides=('widelands') conflicts=('widelands' 'widelands-data') url="http://wl.widelands.org" changelog=changelog source=("changelog") sha1sums=('SKIP') # HACK: Use Prepare to make a lightweight checkout, since it is a little faster # than a full branch, as pacman would do it. If you have a better solution, # just tell me. prepare() { cd "$srcdir" if test -d "$pkgname/.bzr"; then cd "$pkgname" msg2 "Updating bzr checkout" bzr update else # don't use lp: to avoid bzr asking for ssh passphrase to authenticate # on launchpad msg2 "Making lightweight checkout. This may take some time." bzr checkout --lightweight "http://bazaar.launchpad.net/~widelands-dev/widelands/trunk" "$pkgname" fi } build() { cd "$srcdir/$pkgname" test -d build/locale || mkdir -p build/locale test -e locale || ln -s build/locale cd build msg2 "Running cmake..." # if this failes on an existing build because of an mismatch of src and build cmake files, just delete build and try again. cmake .. -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_INSTALL_PREFIX=/usr/bin \ -DWL_INSTALL_DATADIR=/usr/share/widelands msg2 "Running make..." make } package() { cd "$srcdir/$pkgname/build" make DESTDIR="$pkgdir" install } pkgver() { printf "r%s" "$(bzr revno "http://bazaar.launchpad.net/~widelands-dev/widelands/trunk" -q)" }