summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 79cb4cd30f1c1b321c39c1400e55d6a5c1c824c4 (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: Tomasz Pakula <forest10pl@gmail.com>
_reponame=hid-logitech-hidpp
_pkgname=hidpp-logitech-g-pro-wheel-dkms
pkgname=$_pkgname-git
provides=($_pkgname)
conflicts=($_pkgname)
pkgver=0.3
pkgrel=1
pkgdesc="hid-logitech-hidpp with G Pro Racing Wheel PC/XBOX support"
arch=('x86_64')
url="https://github.com/Lawstorant/hid-logitech-hidpp"
license=('GPL2')
depends=(dkms)
makedepends=(
  git
  gcc
  glibc
)
source=(
  git+https://github.com/Lawstorant/hid-logitech-hidpp
)
sha256sums=(
  'SKIP'
)

pkgver() {
  cd "$srcdir/$_reponame"
  git describe --long --tags | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
}

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

  find . -type f \( -name 'dkms.conf' -o -name '*.c' \) -exec sed -i "s/#VERSION#/$pkgver/" {} +
  echo 'ccflags-y += -DDEBUG' >> "Kbuild"

  echo "* Copying module into /usr/src..."
  install -dm755 "${pkgdir}/usr/src/${_reponame}-${pkgver}"
  cp -r ${srcdir}/$_reponame/* "${pkgdir}/usr/src/${_reponame}-${pkgver}"
}