summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 3648abb0ab33221bcbfd61fbc4f1ec32d60a22d8 (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
65
# Contributor: Stunts <f.pinamartins@gmail.com>
pkgname=xboxdrv-develop-git
_pkgname=xboxdrv
pkgver=0.8.4.r455.g1d267b9
pkgrel=1
pkgdesc="XBox/XBox 360 userspace gamepad driver and emulator - git development branch"
arch=('i686' 'x86_64')
url="https://xboxdrv.gitlab.io"
license=('GPL3')

depends=(
  'bluez-libs'
  'dbus-glib'
  'dbus-python'
  'fmt'
  'libusb'
  'libx11'
  'systemd'
)
makedepends=(
  'git'
  'scons'
  'pkg-config'
)

provides=('xboxdrv')
conflicts=('xboxdrv')

source=(
  "${pkgname}"::'git+https://gitlab.com/xboxdrv/xboxdrv.git#commit=1d267b92326375f2b8f3dd895c34f8eacc703a4e'
  'xboxdrv.service'
  'xboxdrv.conf'
)
sha256sums=(
  'SKIP'
  '51387a52a97d2e004a4160432131f18326e9ae655447694e170f18bdb8d7204f'
  'f155dd059faecafa60ecaa0988aec815ee0c58f1af45075de82ae10c31db2750'
)

prepare() {
  cd ${pkgname}
  git submodule update --recursive --init
}

pkgver() {
  cd ${pkgname}
  # cutting off 'v' prefix present in the git tag
  git describe --long | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
}

build() {
  cd ${pkgname}
  mkdir -p build
  cd build
  cmake .. -DCMAKE_INSTALL_PREFIX:PATH=/usr
  make
}

package() {
  cd ${pkgname}/build
  make install DESTDIR=${pkgdir}
  
  install -D -m755 ${srcdir}/xboxdrv.service ${pkgdir}/usr/lib/systemd/system/xboxdrv.service
  install -D -m644 ${srcdir}/xboxdrv.conf ${pkgdir}/etc/conf.d/xboxdrv
}