# Maintainer: Vincent Herlemont <vincentherl@leszeros.com>
pkgname=short-git
pkgver=v0.0.1.r43.g644552c
pkgrel=1
source=("${pkgname}::git+https://github.com/vincent-herlemont/short.git")
makedepends=('git' 'rust' 'cargo')
provides=()
replaces=()
md5sums=('SKIP')
arch=('i686' 'x86_64' 'armv6h' 'armv7h')

pkgver() {
    git describe --long --tags | sed 's/^foo-//;s/\([^-]*-g\)/r\1/;s/-/./g'
}

build() {
    cd ${pkgname};
    cargo build --release --frozen --all-features
}

package() {
   cd ${pkgname};
   install -Dm 755 target/release/short -t "${pkgdir}/usr/bin"
}
