summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 833050285b1e9f346a376b319e84a692424e1feb (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
# Maintainer: nous(at)artixlinux.org

pkgname=input-veikk-dkms
_pkgname=input-veikk
pkgver=r34.63d8367
pkgrel=2
pkgdesc="Linux driver providing pressure sensitivity for VEIKK drawing tablets (S640, A50, A30)"
arch=('i686' 'x86_64')
url="https://github.com/jlam55555/veikk-s640-driver"
license=('GPL')
depends=('dkms' 'git')
#source=("${url}/archive/master.zip"
#        'veikk.conf')
source=(${_pkgname}::git+${url}.git
        'veikk.conf'
        'dkms.conf')
sha1sums=('SKIP'
          '58ea5a020380c922d62b43c6403b4310a18967b4'
          '35423db037910181d6fcada916180b09c28ff8ad')

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

package() {
  # Installation directory
  local install_dir="${pkgdir}/usr/src/${_pkgname}-${pkgver}"

  cd "${srcdir}/${_pkgname}"

  sed -i "s/@MODULE_VERSION@/${pkgver}/" "${srcdir}/dkms.conf"
  sed -i "s/@MODULE_VERSION@/${pkgver}/" "${srcdir}/dkms.conf"
  install -D -m644 -t "${install_dir}/" "${srcdir}/dkms.conf"
 
  # Install source files
  for file in {Makefile,dkms.conf,*.c,*.h}; do
    [ -f "$file" ] || continue
    install -D -m644 -t "${install_dir}/" "${file}"
  done
  # Load the module at boot
  install -Dm644 ${srcdir}/veikk.conf ${pkgdir}/etc/modules-load.d/veikk.conf

}