summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 52a8bbbcdcb9c434fd43a8187ec5aceb6bca71b0 (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
# Maintainer: Dimitrios Vogiatzis <me@dimtree.net>

pkgname=pxl-git
_pkgname=pxl
pkgver=r20.9c3ae93
pkgrel=1
pkgdesc="A little hack to display images in the terminal"
arch=('i686' 'x86_64')
url="https://github.com/ichinaski/pxl"
license=('custom')
depends=()
makedepends=('go' 'git')
source=("$pkgname::git+https://github.com/ichinaski/pxl")
md5sums=('SKIP')

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

prepare() {
    mkdir -p "$srcdir/go"
    export GOPATH="$srcdir/go"
    go get github.com/nsf/termbox-go
}

build() {
    cd "$pkgname"
    go build
}

package() {
    cd "$pkgname"
    install -Dm755 "$pkgname" "$pkgdir/usr/bin/$_pkgname"
    install -Dm644 "LICENSE" "$pkgdir/usr/share/licenses/$_pkgname/LICENSE"
}

# vim:ft=sh