summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 159dcf649742c0e1b7021c5e6eae99f29458fed5 (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
# Maintainer: main() <main@ehvag.de>

_pkgbase=aquacomputer_d5next-hwmon
pkgname=aquacomputer_d5next-hwmon-dkms
pkgver=1
pkgrel=2
pkgdesc="Hwmon Linux kernel driver for monitoring and configuring Aquacomputer PC watercooling devices"
arch=('x86_64')
url="https://github.com/aleksamagicka/aquacomputer_d5next-hwmon"
license=('GPL2')
depends=('dkms')
conflicts=("${_pkgbase}")
source=("repo::git+${url}"
        'dkms.conf')
md5sums=('SKIP'
         '9083307a12a4b7dfc35d733f68d8200d')


package() {
  # Copy dkms.conf
  install -Dm644 dkms.conf "${pkgdir}"/usr/src/${_pkgbase}-${pkgver}/dkms.conf

  # Set name and version
  sed -e "s/@_PKGBASE@/${_pkgbase}/" \
      -e "s/@PKGVER@/${pkgver}/" \
      -i "${pkgdir}"/usr/src/${_pkgbase}-${pkgver}/dkms.conf

  # Patch version
  echo 'MODULE_VERSION("git");' >> "repo/aquacomputer_d5next.c"

  # Copy sources (including Makefile)
  cp -r repo/* "${pkgdir}"/usr/src/${_pkgbase}-${pkgver}/
  rm -r "${pkgdir}"/usr/src/${_pkgbase}-${pkgver}/re-docs
}