summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 37d53706d0307d95e5057ab884ff335e3a582678 (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: Gaurav Atreya <allmanpride at gmail dot com>
pkgname=nameit-git
pkgver=0.1.3
pkgrel=1
pkgdesc="Tool to run commands based on a templates"
arch=('x86_64')
url="https://github.com/Atreyagaurav/${pkgname%-git}"
license=('GPL3')
depends=('gcc-libs')
makedepends=('rust' 'cargo' 'git')
source=("git+https://github.com/Atreyagaurav/${pkgname%-git}.git")
md5sums=('SKIP')

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

prepare() {
    cd "$srcdir/${pkgname%-git}"
    git checkout "tags/$(git describe --tags --abbrev=0)"
}


build() {
	cd "$srcdir/${pkgname%-git}"
	cargo build --release
}

package() {
    cd "$srcdir/${pkgname%-git}"
    mkdir -p "$pkgdir/usr/bin"
    cp "target/release/${pkgname%-git}" "$pkgdir/usr/bin/${pkgname%-git}"
}