summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: c5a4d09b63f730ec789a88cd04e00103fbd9a4c3 (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
# Maintainer: Márton Szabó < echo "bm90cmFtb0B2aXBtYWlsLmh1Cg=="|base64 -d >

pkgname=tokei-git
pkgver=7.0.1.r17.16d49fc
pkgrel=1
pkgdesc='A blazingly fast CLOC(Count Lines Of Code) program'
arch=('i686' 'x86_64')
url="https://github.com/Aaronepower/tokei"
license=('MIT' 'Apache')
depends=('gcc-libs')
makedepends=('rust' 'cargo')
conflicts=('tokei')
source=("git+https://github.com/Aaronepower/tokei")
sha512sums=(SKIP)

pkgver() {
    cd "${srcdir}/tokei"
    printf "%s" "$(git describe --long --tags | sed 's/^v//;s/\([^-]*-\)g/r\1/;s/-/./g')"
}

build() {
    cd "${srcdir}/tokei"

    cargo build --release
}

package() {
    cd "${srcdir}/tokei"

    install -Dm755 target/release/tokei "${pkgdir}/usr/bin/tokei"

    install -Dm644 LICENCE-MIT "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE-MIT"
    install -Dm644 LICENCE-APACHE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE-APACHE"
}