summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: c95d7b1a3c6b81624109831ad0dd53cba2e876bc (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
# Maintainer: Christian Muehlhaeuser <muesli at gmail dot com>

pkgname=knoxite-git
pkgver=r551.bfdf2fa
pkgrel=1
pkgdesc="A data storage & backup system"
arch=('x86_64')
url="https://github.com/knoxite/knoxite"
license=('MIT')
makedepends=('go' 'git')
provides=("knoxite")
conflicts=("knoxite")
source=($pkgname::git://github.com/knoxite/knoxite.git)
sha256sums=('SKIP')

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

build() {
    cd "$srcdir"/$pkgname/cmd/knoxite
    go build \
        -trimpath \
        -ldflags "-X main.Version=$pkgver -extldflags $LDFLAGS" \
        -o "knoxite" .
}

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