summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 237856e36937c1d3e55e302d5329461ac080d4ee (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# Maintainer: Jose Riha <jose1711 gmail com>
pkgname=controllermap
pkgver=2.0.6
pkgrel=1
pkgdesc="Game controller mapping generator"
arch=('i686' 'x86_64')
url="http://www.libsdl.org"
license=('MIT')
depends=('sdl2')
source=("http://www.libsdl.org/release/SDL2-${pkgver}.tar.gz")
md5sums=('4c2d602766b48b8f1b19a6f903ef5ecf')

build() {
cd $srcdir/SDL2-${pkgver}/test
sed -i '/bmp/s%"\([^"][^"]*\)"%"/usr/share/controllermap/\1"%' controllermap.c
gcc -lSDL2 -I/usr/include/SDL2  -o controllermap controllermap.c
}

package() {
install -Dm755 $srcdir/SDL2-${pkgver}/test/controllermap $pkgdir/usr/bin/controllermap
install -Dm644 $srcdir/SDL2-${pkgver}/test/controllermap.bmp $pkgdir/usr/share/controllermap/controllermap.bmp
install -Dm644 $srcdir/SDL2-${pkgver}/test/axis.bmp $pkgdir/usr/share/controllermap/axis.bmp
install -Dm644 $srcdir/SDL2-${pkgver}/test/button.bmp $pkgdir/usr/share/controllermap/button.bmp
}