core/sdl2/PKGBUILD
2013-09-29 15:05:28 +00:00

41 lines
1.3 KiB
Bash

#
# Platform Packages for Chakra, part of chakra-project.org
#
# maintainer: Manuel Tortosa <manutortosa[at]chakra-project[dot]org>
pkgname=sdl2
pkgver=2.0.0
pkgrel=1
pkgdesc="A library for portable low-level access to a video framebuffer, audio output, mouse, and keyboard (Version 2.0). (Mercurial Version)"
arch=('i686' 'x86_64')
url="http://www.libsdl.org"
license=('MIT')
depends=('glibc' 'libxext' 'libxrender' 'libx11' 'libgl')
makedepends=('alsa-lib' 'mesa' 'libpulse' 'cmake' 'libxrandr' 'libxinerama')
optdepends=('alsa-lib: ALSA audio driver'
'libpulse: PulseAudio audio driver')
source=("http://www.libsdl.org/release/SDL2-${pkgver}.tar.gz"
"FindSDL2.cmake")
sha256sums=('6f6ac8153d90e06a118474d5400624ae82b3d3e080915505db27cebc52b27178'
'190002df5523cf5297d48e4615d39df78193221a41375fa368c854262e7020ca')
build() {
cd "${srcdir}/SDL2-${pkgver}"
mkdir build && cd build
cmake .. -DCMAKE_INSTALL_PREFIX=/usr \
-DSDL_STATIC=OFF \
-DRPATH=OFF
make
}
package() {
cd "${srcdir}/SDL2-${pkgver}/build"
make DESTDIR="${pkgdir}/" install
install -Dm644 ../COPYING.txt "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
# we can remove the following when provided directly by cmake
install -Dm644 $srcdir/FindSDL2.cmake ${pkgdir}/usr/share/cmake-2.8/Modules/FindSDL2.cmake
}