summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 5ab06c5e20b7c64d99c0747d51ff11bededf87f3 (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
25
26
27
# Maintainer: Alexandre Bouvier <contact@amb.tf>
_pkgname=sdl-gamecontrollerdb
pkgname=$_pkgname-git
pkgver=r1420.9d09945
pkgrel=1
pkgdesc="A community sourced database of game controller mappings to be used with SDL2 Game Controller functionality"
arch=('any')
url="https://github.com/mdqinc/SDL_GameControllerDB"
license=('Zlib')
makedepends=('git')
optdepends=('sdl2' 'sdl3')
provides=("$_pkgname=$pkgver")
conflicts=("$_pkgname")
source=("$_pkgname::git+$url.git")
b2sums=('SKIP')

pkgver() {
	cd $_pkgname
	printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

package() {
	cd $_pkgname
	# shellcheck disable=SC2154
	install -Dm644 -t "$pkgdir"/usr/share/sdl gamecontrollerdb.txt
	install -Dm644 -t "$pkgdir"/usr/share/licenses/$pkgname LICENSE
}