summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 5b1a68057a7a1d4989b787956086db98daaf9d52 (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
28
29
30
31
32
33
34
35
36
37
38
39
40
# Maintainer: Philip Abernethy<chais.z3r0@gmail.com>
pkgname=sdl-jstest-git
pkgver=0.2.2.r24.g60f6e62
epoch=1
pkgrel=1
pkgdesc="Simple SDL joystick test application for the command line."
url="https://github.com/Grumbel/sdl-jstest"
arch=('x86_64' 'i686')
license=('GPL-3.0-or-later')
depends=('sdl' 'sdl2' 'ncurses' 'hicolor-icon-theme')
makedepends=('git' 'cmake')
provides=('sdl-jstest')
install="${pkgname}.install"
source=('git+https://github.com/Grumbel/sdl-jstest' 'git+https://github.com/grumbel/tinycmmc.git' 'git+https://github.com/gabomdq/SDL_GameControllerDB')
sha512sums=('SKIP' 'SKIP' 'SKIP')

pkgver() {
	cd "${pkgname%-git}"
	git describe --long --abbrev=7 | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
}

prepare() {
	cd "${pkgname%-git}"
	git submodule init
	git config submodule.external/tinycmmc.url "$srcdir/tinycmmc"
	git config submodule.external/sdl_gamecontrollerdb.url "$srcdir/SDL_GameControllerDB"
	git -c protocol.file.allow=always submodule update
}

build() {
	cmake -B build -S "${pkgname%-git}" \
        -DCMAKE_BUILD_TYPE='None' \
        -DCMAKE_INSTALL_PREFIX='/usr' \
        -Wno-dev
    cmake --build build
}

package() {
DESTDIR="$pkgdir" cmake --install build
}