summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorGabriel Margiani2015-06-10 23:16:49 +0400
committerGabriel Margiani2015-06-10 23:16:49 +0400
commit850008abcc4c7634acda5bb6839e6311f3995b93 (patch)
treedbffd084b70c0ee213222efa2fa53d5b4830767e /PKGBUILD
downloadaur-850008abcc4c7634acda5bb6839e6311f3995b93.tar.gz
initial import
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD61
1 files changed, 61 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..6704740c79c6
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,61 @@
+#Maintainer: Gabriel Margiani (gamag) <gabriel _strange_curved_character_ margiani · ch>
+#Contributor: matthiaskrgr <matthias · krueger _strange_curved_character_ famsike · de>
+
+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)"
+}