author | Sven-Hendrik Haase
<svenstaro@archlinux.org> 2011-05-26 06:40:32 UTC |
committer | Sven-Hendrik Haase
<svenstaro@archlinux.org> 2011-05-26 06:40:32 UTC |
parent | 13e5d4b24c68bb79c90b3b781bdd14fb11f4207f |
PKGBUILD | +49 | -19 |
diff --git a/PKGBUILD b/PKGBUILD index 1999f15..2e7c11d 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -1,29 +1,59 @@ # Maintainer: Sven-Hendrik Haase <sh@lutzhaase.com> -# Contributor: Arvil <arvil at k3v1n5 dot eu> pkgname=csfml -pkgver=1.6 + +_git=true + +if [[ "${_git}" = "true" ]]; then + pkgver=1.99.git20110526 +fi + pkgrel=1 -pkgdesc="C binding for SFML." +pkgdesc='C bindings for sfml' arch=('i686' 'x86_64') -url=http://www.sfml-dev.org +url='http://www.sfml-dev.org/' license=('zlib') depends=('sfml') -source=(http://downloads.sourceforge.net/sfml/SFML-$pkgver-c-sdk-linux-32.tar.gz) -md5sums=('47612e9dc3c9be35e32c188dd937e0d6') +makedepends=('git' 'cmake' 'doxygen') + +_gitroot='https://github.com/LaurentGomila/SFML.git' +_gitname='SFML' build() { - cd "$srcdir/SFML-$pkgver/CSFML" - - msg "Building libraries." - make || return 1 - make DESTDIR=${pkgdir}/usr install || return 1 - - # Fix the library softlinks - cd "$pkgdir/usr/lib" - rm *.so - for lib in *; do - ln -s $lib ${lib/.$pkgver/} - done + cd "$srcdir" + msg "Connecting to GIT server...." + + if [ -d $_gitname ] ; then + cd $_gitname && git pull origin + msg "The local files are updated." + else + git clone $_gitroot + cd $_gitname + fi + + msg "GIT checkout done or server timeout" + msg "Starting make..." + + rm -rf "$srcdir/$_gitname-build" + cp -r "$srcdir/$_gitname" "$srcdir/$_gitname-build" + cd "$srcdir/$_gitname-build" + + cd bindings/c/ + mkdir build && cd build + cmake -DCMAKE_INSTALL_PREFIX=/usr .. \ + -DBUILD_DOC=true + make + make doc } -# vim:set ts=2 sw=2 et: + +package() { + cd "$srcdir/$_gitname-build/bindings/c/build/" + + make DESTDIR="$pkgdir/" install + + install -Dm644 ../license.txt \ + ${pkgdir}/usr/share/licenses/${pkgname}/LICENSE + + make clean +} +