aboutsummaryrefslogtreecommitdiffstats
path: root/community/xwiimote/APKBUILD
blob: ceb146cdf7b066ee5f776a0777199eef5aab9031 (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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: Bart Ribbers <bribbers@disroot.org>
pkgname=xwiimote
pkgver=2_git20131227
pkgrel=0
_commit="f2be57e24fc24652308840cec2ed702b9d1138df"
pkgdesc="Open-source Nintendo Wii Remote Linux Device Driver"
url="https://github.com/dvdhrm/xwiimote"
# ppc64le fails to build
arch="all !ppc64le"
license="MIT"
makedepends="
	autoconf
	automake
	doxygen
	eudev-dev
	libtool
	linux-headers
	ncurses-dev
	"
subpackages="$pkgname-static $pkgname-dev $pkgname-doc lib$pkgname:libs"
source="https://github.com/dvdhrm/xwiimote/archive/$_commit/xwiimote-$_commit.tar.gz
	0001-fix-32bit-build.patch
	xwiimote.conf
	"
builddir="$srcdir/$pkgname-$_commit"

prepare() {
	default_prepare

	NOCONFIGURE=1 ./autogen.sh
}

build() {
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--localstatedir=/var
	make
}

check() {
	make check
}

package() {
	make DESTDIR="$pkgdir" install
}

libs() {
	default_libs

	install -Dm644 -t "$subpkgdir"/usr/share/X11/xorg.conf.d "$builddir"/res/50-xorg-fix-xwiimote.conf
	install -Dm644 -t "$subpkgdir"/etc/modules-load.d "$srcdir"/xwiimote.conf
}

sha512sums="
f7bca448c81615225298bad786967f56579d2b93cb40063be9c4d37066891747f91d50e18e135ed932496f22ef4c8030ea206a7b7c4c3316e272afe764b0afce  xwiimote-f2be57e24fc24652308840cec2ed702b9d1138df.tar.gz
a47edd713725ac4b2327f37f4be4ae3717b8e1a715a4fb12bab0a4b8ffe0d64f7a4033f6176f07dd1776004564064f0373ae1ae2cfd1bd3f416ec2e41a7d9126  0001-fix-32bit-build.patch
ce1caa65cb231e9c2584bad8e7b8bb50ac3716ba6feb0d10a8fd271c401bc5a440c988b92f3321c5976a5ab5edf7ec8c5195d115f1c4c6ac9471f2a52a784e23  xwiimote.conf
"