summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 8ef98106cb7334a7fd259ccd0860edace407b8c7 (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
# Maintainer: Jonpas <jonpas33@gmail.com>
# Previous Maintainer: forivall <forivall@gmail.com>

_pkgbase=hid-lg-g710-plus
_pkgname=${_pkgbase}-dkms
pkgname=${_pkgname}-git
pkgdesc="Linux DKMS kernel module allowing use of extra keys and LEDs on the Logitech G710+"
pkgver=r34.8433ee4
pkgrel=5
arch=('x86_64')
license=('GPL2')
url="http://github.com/wdouglass/logitech-g710-linux-driver"
depends=('dkms')
optdepends=('linux-headers: build the module against Arch kernel')
makedepends=('git')
provides=('hid-lg-g710-plus')
conflicts=('hid-lg-g710-plus' 'logitech-g710-kmod-git' 'logitech-g710')

source=("${_pkgbase}::git://github.com/wdouglass/logitech-g710-linux-driver.git")
sha256sums=('SKIP')

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

package() {
  cd "$srcdir/$_pkgbase"

  local rev="$(git rev-parse --short HEAD)"

  msg2 "Copying sources, including dkms.conf..."
  mkdir -p "${pkgdir}/usr/src/"
  cp -r src/kernel "${pkgdir}/usr/src/${_pkgbase}-$pkgver/"

  msg2 "Copying udev rules..."
  mkdir -p "${pkgdir}/etc/udev/rules.d/"
  cp misc/90-logitech-g710-plus.rules "$pkgdir/etc/udev/rules.d/"

  msg2 "Copying .Xmodmap..."
  mkdir -p "${pkgdir}/usr/share/logitech-g710/"
  cp misc/.Xmodmap "${pkgdir}/usr/share/logitech-g710/"
}