blob: 301b7b1b1499bc1ca47885d676d2e8c7ea095bc8 (
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
|
# Maintainer: Matteo Bonora <bonora.matteo@gmail.com>
pkgname=kmonad-git
pkgver=0.4.2.r87.g4c324f1
pkgrel=1
pkgdesc="An advanced keyboard manager"
arch=('any')
url="https://github.com/kmonad/kmonad"
license=('MIT')
groups=()
depends=()
makedepends=('git' 'stack') # 'bzr', 'git', 'mercurial' or 'subversion'
provides=("${pkgname%-git}")
conflicts=("${pkgname%-git}")
source=("git+https://github.com/kmonad/kmonad")
md5sums=('SKIP')
pkgver() {
cd "$srcdir/${pkgname%-git}"
git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
}
build() {
export STACK_ROOT="${srcdir}/.stack"
cd "$srcdir/${pkgname%-git}"
stack --compiler ghc-9.6.5 build
}
package() {
export STACK_ROOT="${srcdir}/.stack"
cd "$srcdir/${pkgname%-git}"
stack --compiler ghc-9.6.5 install --local-bin-path="$pkgdir/usr/bin"
install -Dm644 "startup/${pkgname%-git}@.service" -t "$pkgdir/usr/lib/systemd/system"
install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
install -Dm644 "doc/faq.md" "$pkgdir/usr/share/doc/$pkgname/faq.md"
install -Dm755 "keymap/tutorial.kbd" "$pkgdir/usr/share/doc/$pkgname/keymap/tutorial.kbd"
for file in "keymap/template/"*.kbd; do
install -Dm755 "$file" -t "$pkgdir/usr/share/doc/$pkgname/keymap/template"
done
}
|