summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 919c1625d43e590f6e25920dde9ef511c3037122 (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: Felix Morgner <felix.morgner@gmail.com>

_pkgname=cyber
pkgname=${_pkgname}-dkms-git
pkgver=v42.1729.1939.r8.g006399d
pkgrel=1
pkgdesc="CYBER for your system (DKMS)"
arch=('i686' 'x86_64')
url="https://github.com/fmorgner/dev-cyber"
license=('GPL2')
conflicts=('cyber-dkms')
depends=('dkms')
source=("dev-cyber::git+https://github.com/fmorgner/dev-cyber#branch=master"
        "dkms.conf")
sha256sums=('SKIP'
            'ee0dc9de799032c7623b91da4b1a6eefffdc64059a15d8bed02f5546993b018c')

pkgver() {
  cd "$srcdir/dev-${_pkgname}"
  git describe --long --abbrev=7 | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
}

package() {
  cd "$srcdir"

  local install_dir="${pkgdir}/usr/src/${_pkgname}-${pkgver}"

  install -Dm644 dkms.conf "${install_dir}/dkms.conf"

  sed -e "s/@_PKGBASE@/${_pkgname}/" \
      -e "s/@PKGVER@/${pkgver}/" \
      -i "${install_dir}/dkms.conf"

  cd "dev-${_pkgname}"

  for d in $(find . -type d); do
    install -dm755 "${install_dir}/$d"
  done

  for f in $(find . -type f); do
    install -m644 "$f" "${install_dir}/$f"
  done
}