summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 6809754da8ca01fb4d9b1d43f80ef8e47cfcf774 (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
pkgname=loc-git
pkgver=0.3.2.107
pkgrel=1
pkgdesc="Count lines of code quickly."
arch=('x86_64' 'i686')
url="https://github.com/cgag/loc"
license=('MIT')
depends=()
makedepends=('cargo')
optdepends=()
provides=('loc')
conflicts=('loc')
source=($pkgname::git+https://github.com/cgag/loc.git)
sha256sums=('SKIP')

pkgver() {
    cd $pkgname
	echo $(grep '^version =' Cargo.toml|head -n1|cut -d\" -f2).$(git rev-list --count HEAD)
}

build() {
    cd $pkgname
	cargo build --release
}

package() {
	cd $pkgname
	install -D -m755 "$srcdir/$pkgname/target/release/loc" "$pkgdir/usr/bin/loc"
}