summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 9456e0b46f21c0820d577f53962633121fc8c4f9 (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
# Maintainer: Michael Riegert <michael at eowyn net>

pkgname='blflash-git'
_pkgname='blflash'
pkgver=0.3.0.0.gb0967e7
pkgrel=1
pkgdesc='BL602 serial flasher'
arch=('x86_64')
url=https://github.com/spacemeowx2/blflash
license=('MIT')
depends=('cargo')
provides=('blflash')
conflicts=('blflash')
source=("${pkgname}"::git+${url})
md5sums=('SKIP')

pkgver() {
    cd "${pkgname}"
    git describe --long --tags | sed 's/-/./g;s/v//g'
}

build(){
    cd "${pkgname}"
    cargo build --release --target-dir=target
}

package() {
    cd "${pkgname}"
    install -Dm644 LICENSE-MIT "${pkgdir}"/usr/share/licenses/"${pkgname}"/LICENSE
    install -Dm755 target/release/${_pkgname} ${pkgdir}/usr/bin/${pkgname}
}