summaryrefslogtreecommitdiff
path: root/libre/deepin-anything-module/PKGBUILD
blob: 37a2e539ca5ec58d20c3e9d7e30cdb2709b370bf (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 (arch): Felix Yan <felixonmars@archlinux.org>
# Contributor: Andreas Grapentin <andreas@grapentin.org>

_basekernel=5.4.12-1

pkgname=deepin-anything-module
pkgver=5.0.1
pkgrel=45
pkgrel+=.parabola1.basekernel${_basekernel%-*}
pkgdesc="Deepin Anything file search tool, kernel module for Linux kernel"
pkgdesc+=' (built for the linux-libre kernel package)'
arch=('x86_64')
url="https://github.com/linuxdeepin/deepin-anything"
license=('GPL3')
makedepends=(linux-libre-headers=${_basekernel%-*} libelf)
conflicts=('deepin-anything-arch')
provides=('DEEPIN-ANYTHING-MODULE')
replaces=('deepin-anything-arch')
source=("$pkgname-$pkgver.tar.gz::https://github.com/linuxdeepin/deepin-anything/archive/$pkgver.tar.gz")
sha512sums=('f79b4db917cce2611bd6964d00ae0e162fc500fa7ca76a987145456a9ee81296c776d2b83cf6492a4224c4e4fd95df3ad95a25c1c14d2d4e6865f5bbd639be14')

build() {
  cd deepin-anything-$pkgver
  make -C kernelmod kdir=/usr/src/linux-libre
}

package() {
  depends=(linux-libre=${_basekernel%-*})

  cd deepin-anything-$pkgver
  local extradir=/usr/lib/modules/$(</usr/src/linux-libre/version)/extramodules
  install -Dt "$pkgdir$extradir" -m644 kernelmod/*.ko
  find "$pkgdir" -name '*.ko' -exec xz {} +
}