updated on Sun Jan 22 12:09:12 UTC 2012
[aur-mirror.git] / lib32-sfml-git / PKGBUILD
blob6fb6b88377930de84781675e8fb2aa078ca42d15
1 # Maintainer: Baptiste Jonglez <zerstorer at free dot fr>
2 # Contributor: RetroX <classixretrox@gmail.com>
4 _pkgbasename=sfml
5 pkgname=lib32-${_pkgbasename}-git
6 pkgver=20110604
7 pkgrel=1
8 pkgdesc='A simple, fast, cross-platform, and object-oriented multimedia API (32-bit))'
9 arch=('x86_64')
10 url='http://www.sfml-dev.org/'
11 license=('zlib')
12 depends=("$_pkgbasename" 'lib32-libsndfile' 'lib32-libxrandr' 'lib32-libjpeg' 'lib32-openal' 'lib32-glew' 'lib32-freetype2')
13 makedepends=('gcc-multilib' 'git' 'lib32-mesa' 'cmake')
14 options=('!libtool')
16 _gitroot='https://github.com/LaurentGomila/SFML.git'
17 _gitname='SFML'
19 build() {
20   cd "$srcdir"
21   msg "Connecting to GIT server...."
23   if [ -d $_gitname ] ; then
24     cd $_gitname && git pull origin
25     msg "The local files are updated."
26   else
27     git clone $_gitroot
28     cd $_gitname
29   fi
31   msg "GIT checkout done or server timeout"
32   msg "Starting make..."
34   rm -rf "$srcdir/$_gitname-build"
35   cp -r "$srcdir/$_gitname" "$srcdir/$_gitname-build"
36   cd "$srcdir/$_gitname-build"
38   export CC="gcc -m32"
39   export CXX="g++ -m32"
40   export PKG_CONFIG_PATH="/usr/lib32/pkgconfig"
42   mkdir build && cd build
43   cmake .. -DCMAKE_INSTALL_PREFIX=/usr \
44     -DLIB_SUFFIX=32 \
45     -DLIB_INSTALL_DIR=/usr/lib32
46   make
49 package() {
50   cd "$srcdir/$_gitname-build/build"
51   make DESTDIR="$pkgdir/" install
53   # those are already included in the sfml package
54   rm -rf "$pkgdir/usr/share" "$pkgdir/usr/include"
56   make clean