updated on Thu Jan 26 16:09:46 UTC 2012
[aur-mirror.git] / sdlhack / PKGBUILD
blobcd63a721601d2e2379112f140c213754a49d88a0
1 # Maintainer: dobo <dobo90_at_gmail.com>
3 pkgname=sdlhack
4 pkgver=1.2
5 pkgrel=1
6 pkgdesc='A wrapper for SDL which lets you force fullscreen games to minimize.'
7 arch=(i686 x86_64)
8 url=http://jspenguin.org:81/software/sdlhack/
9 license=(LGPL)
10 depends=(glibc bash)
11 [ ${CARCH} = x86_64 ] && depends[0]=lib32-glibc
12 makedepends=(sdl)
13 [ ${CARCH} = x86_64 ] && makedepends+=(gcc-multilib)
14 source=(http://jspenguin.org:81/software/sdlhack/${pkgname}-${pkgver}.tar.gz)
15 md5sums=(3f397e319ecc69096b1dee38041ca42f)
17 build() {
18         cd ${srcdir}/${pkgname}-${pkgver}
20         CFLAGS="${CFLAGS} $(sdl-config --cflags) -shared -fPIC -O2 -ldl -Wall"
22         gcc -m32 ${CFLAGS} libsdlhack.c -o libsdlhack-i386.so
23         if [ ${CARCH} = x86_64 ]; then gcc -m64 ${CFLAGS} libsdlhack.c -o libsdlhack-x86_64.so; fi
26 package() {
27         cd ${srcdir}/${pkgname}-${pkgver}
29         if [ ${CARCH} = i686 ]; then
30                 install -D -m 755 libsdlhack-i386.so ${pkgdir}/usr/lib/libsdlhack.so
31         else # x86_64
32                 install -D -m 755 libsdlhack-i386.so ${pkgdir}/usr/lib32/libsdlhack.so
33                 install -D -m 755 libsdlhack-x86_64.so ${pkgdir}/usr/lib/libsdlhack.so
34         fi
36         install -D -m 755 sdlhack ${pkgdir}/usr/bin/sdlhack
37         install -D -m 644 README ${pkgdir}/usr/share/doc/${pkgname}/README