summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 44801cd7e4b2011f1e9120931d05af4eb4aa5448 (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
# Maintainer: Ashymad <ashymad@posteo.net>

_pkgbase=comedi
pkgname=${_pkgbase}-dkms-git
pkgver=r3496.9a780c9a
pkgrel=1
pkgdesc="The Linux Control and Measurement Device Interface"
arch=('any')
url="https://github.com/Linux-Comedi/comedi"
depends=('dkms' 'automake')
makedepends=('git')
optdepends=('comedilib: userspace library for COMEDI devices')
license=('GPL2')
conflicts=("${_pkgbase}")

source=("${_pkgbase}::git+$url.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}"

  autoupdate
  autoreconf -vfi

  mkdir -p "${pkgdir}"/usr/src/${_pkgbase}-${pkgver}/
  cp -vr * "${pkgdir}"/usr/src/${_pkgbase}-${pkgver}/

  sed -e "s/^PACKAGE_VERSION=.*$/PACKAGE_VERSION=${pkgver}/" \
      -i "${pkgdir}"/usr/src/${_pkgbase}-${pkgver}/dkms.conf
}