summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 2ae077fa84d6588876205fddefc7f9e44069505c (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: Nick Bulischeck <nbulisc@g.clemson.edu>
# Contributor: Weston Belk <westonb@g.clemson.edu>

pkgname=tyton-dkms-git
_pkgbase=tyton
pkgver=1
pkgrel=2
pkgdesc="Linux Kernel-Mode Rootkit Hunter for 4.4.0-31+."
arch=('i686' 'x86_64')
url="https://github.com/nbulischeck/tyton/"
license=('GPL3')
depends=('dkms' 'linux-headers' 'gcc' 'make')
source=("git+https://github.com/nbulischeck/tyton.git")
sha1sums=('SKIP')

build() {
  cd "${srcdir}/${_pkgbase}"

  make DESTDIR="${pkgdir}"
}

package() {
  cd "${srcdir}/${_pkgbase}"
  
  # Install
  make DESTDIR="${pkgdir}" install
  make DESTDIR="${pkgdir}" clean

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

  # Copy source files
  INSTALLDIR="${pkgdir}/usr/src/${_pkgbase}-${pkgver}.${pkgrel}"
  find . -type f \
    \( -path ./notify \) -prune -o \
    \( -path ./images \) -prune -o \
    \( -path ./.git \) -prune -o \
    -exec install -Dm644 "{}" "${INSTALLDIR}/{}" \;

  # Move dkms up
  mv "${INSTALLDIR}/packaging/aur/dkms.conf" "${INSTALLDIR}/dkms.conf"
}