summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 42a7c477428a0161b4e679d8003467bca44c918d (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
# Contributor: Vojtech Kral <vojtech_kral^hk>

pkgname=kfortune-git
pkgver=r40.15e546c
pkgrel=1
pkgdesc="kernel-space remake of the popular fortune program"
arch=('i686' 'x86_64')
url="https://github.com/vojtechkral/kfortune"
license=('GPL')

makedepends=('git')
install=install
source=('git+https://github.com/vojtechkral/kfortune.git')
sha256sums=('SKIP')

_gitname="kfortune"

pkgver()
{
	cd "${srcdir}/${_gitname}"
	printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

build()
{
	cd "${srcdir}/${_gitname}"
	make
}

package()
{
	cd "${srcdir}/${_gitname}"
	install -D -m 755 'kfortune.ko' "$pkgdir/usr/lib/modules/`uname -r`/kernel/drivers/char/kfortune.ko"
	install -D -m 644 'kfortune.6.gz' "$pkgdir/usr/share/man/man6/kfortune.6.gz"
}