summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: d3b768d0e2957030b627d17bce79538f0afd4c92 (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
45
46
47
48
49
50
# Contributor: wido <widomaker2k7@gmail.com>
# Contributor: SakalisC <chrissakalis (gmail)>
# Maintainer: SanskritFritz (gmail)

pkgname=logkeys-git
_gitname="logkeys"
pkgver=r74.5c36832
epoch=1
pkgrel=2
pkgdesc="Simple keylogger supporting also USB keyboards."
license=('GPLv3')
arch=('i686' 'x86_64')
makedepends=('git')
conflicts=('logkeys')
provides=('logkeys')
url="https://github.com/kernc/logkeys"
install=logkeys.install
backup=('etc/conf.d/logkeysd')
source=("logkeysd.conf" "logkeys.service"
        "$_gitname::git+https://github.com/kernc/logkeys")

md5sums=('c05608a47e303e8f604f46d1ed22aa4a'
         'bd70a5e5601168bbf7bf7f91ee530d14'
         'SKIP')

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

build() {
	cd "$_gitname"
	./autogen.sh
	cd "build"
	../configure --prefix=/usr --sysconfdir=/etc
	make
}

package() {
	cd "$_gitname/build"
	make prefix="$pkgdir/usr" sysconfdir="$pkgdir/etc" install

	install -Dm0644 "$srcdir/logkeysd.conf" "$pkgdir/etc/conf.d/logkeysd"
	install -Dm0644 "$srcdir/logkeys.service" "$pkgdir/usr/lib/systemd/system/logkeys.service"

	cd "../keymaps"
	for filename in $(ls *.map); do
		install -D -m 644 "${filename}" "${pkgdir}/usr/share/lkmaps/${filename}"
	done
}