PKGBUILD 1.51 KB
Newer Older
1 2 3 4 5 6 7 8 9
# Platform Packages for Chakra, part of chakra-project.org
#
# Maintainer: Neophytos Kolokotronis <tetris4@gmail.com>
# Contributor: Balwinder S "bsd" Dheeman (bdheeman AT gmail.com)
#

pkgname=dkms-lts
_pkgname=dkms
pkgver=2.2.0.3
10
pkgrel=5
11 12 13 14 15 16
pkgdesc='Dynamic Kernel Modules System'
arch=('any')
url='http://linux.dell.com/dkms/'
license=('GPL2')
depends=('linux-lts-headers' 'kmod')
backup=('etc/dkms/framework.conf' "etc/conf.d/$pkgname")
17
source=("http://linux.dell.com/$_pkgname/permalink/$_pkgname-$pkgver.tar.gz"
18 19
        "$pkgname.service"
        "$pkgname.systemd"
20 21
        '01-broken-uninstall.patch')
md5sums=('11a8aaade2ebec2803653837c7593030'
22 23
         '02e9744e3fdc3d2f68e46966fb32e260'
         '51c80e29c0ca600b4737c573d3311dbc'
24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46
         '4e3a580c09b5af8de7ffde0b61bdcfcf')

build() {
  patches=("$srcdir"/*.patch)
  cd $_pkgname-$pkgver
  for p in "${patches[@]}"; do
    msg2 "Apply patch: ${p##*/}"
    patch -p1 -i "$p"
  done
}

package() {
  # upstream installer
  pushd $_pkgname-$pkgver
  make DESTDIR="$pkgdir" install
  popd
  # fix hardcoded paths
  sed -i "s|/sbin/depmod|depmod|" $pkgdir/usr/sbin/dkms
  # remove debian specific
  rm -r "$pkgdir/etc/kernel"
  # move bash completion in right place
  install -d -m 755 "$pkgdir/usr/share/bash-completion"
  mv "$pkgdir/etc/bash_completion.d" "$pkgdir/usr/share/bash-completion/completions"
47 48 49
  # add systemd
  install -D -m 644 $pkgname.service "$pkgdir/usr/lib/systemd/system/$pkgname.service"
  install -D -m 755 $pkgname.systemd "$pkgdir/usr/lib/systemd/scripts/$pkgname"
50 51
}