updated on Thu Jan 26 16:09:46 UTC 2012
[aur-mirror.git] / mingw32-sfml-git / PKGBUILD
blobd31f3d4209021b728a5afed4e2b4fdd9dc6e7b88
1 # Maintainer: Sven-Hendrik Haase <sh@lutzhaase.com>
2 # Contributor: Sven Schneider <mr_xyz_unknown@web.de>
3 # Contributor: Dustin Mays <dork.fish.wat@gmail.com>
4 # Contributor: scj <scj archlinux us>
6 pkgname=mingw32-sfml-git
7 pkgver=20111007
8 pkgrel=1
9 pkgdesc="A simple, fast, cross-platform, and object-oriented multimedia API (mingw32)"
10 arch=('i686' 'x86_64')
11 url="http://sfml-dev.org"
12 license=('zlib')
13 depends=('mingw32-libsndfile' 'libxrandr' 'mingw32-libjpeg' 'mingw32-libpng' 'mingw32-openal' 'mingw32-glew' 'mingw32-freetype')
14 makedepends=('mesa' 'cmake' 'git')
15 provides=('mingw32-sfml')
16 source=(cmake-toolchain.cmake)
17 options=(!strip !buildflags)
18 md5sums=('dd2b2db48187dff84050fe191d309d81')
20 _gitroot='https://github.com/LaurentGomila/SFML.git'
21 _gitname='SFML'
23 build() {
24   cd "$srcdir"
25   msg "Connecting to GIT server...."
27   if [ -d $_gitname ] ; then
28     cd $_gitname && git pull origin
29     msg "The local files are updated."
30   else
31     git clone $_gitroot
32     cd $_gitname
33   fi
35   msg "GIT checkout done or server timeout"
36   msg "Starting make..."
38   rm -rf "$srcdir/$_gitname-build"
39   cp -r "$srcdir/$_gitname" "$srcdir/$_gitname-build"
40   cd "$srcdir/$_gitname-build"
41   
42   unset LDFLAGS
43   
44   mkdir build && cd build
45   cmake .. \
46     -DCMAKE_INSTALL_PREFIX=/usr/i486-mingw32/ \
47     -DCMAKE_TOOLCHAIN_FILE=${srcdir}/cmake-toolchain.cmake
48   make
51 package() {
52   cd "$srcdir/$_gitname-build/build"
53   
54   make DESTDIR=${pkgdir} install
56   install -Dm 644 ../license.txt "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
57   rm -r $pkgdir/usr/share/cmake-2.8
58   rm $pkgdir/usr/i486-mingw32/bin/libsndfile-1.dll
59   rm $pkgdir/usr/i486-mingw32/bin/openal32.dll
60   rm $pkgdir/usr/i486-mingw32/license.txt
63 # vim:ts=2:sw=2