summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 16650a3b7303a83bfbb6d858e3c84f00f662f963 (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
# Maintainer: Stefan Haller <fgrsnau@gmail.com>
pkgname=blkdevsync-git
pkgver=0.1.20200607
pkgrel=1
pkgdesc="Synchronize block devices by writting only changed blocks"
arch=('x86_64')
url="https://github.com/fgrsnau/blkdevsync"
license=('MIT')
makedepends=('git' 'rust')
source=('blkdevsync::git+https://github.com/fgrsnau/blkdevsync')
md5sums=('SKIP')

pkgver() {
  cd "${srcdir}/${pkgname%-git}"
  printf '0.1.%s\n' "$(git log -n1 --pretty=format:%ai | cut -d' ' -f1 | tr -d '-')"
}

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

package() {
	cd "$srcdir/${pkgname%-git}"
	install -Dm 755 target/release/blkdevsync -t "${pkgdir}/usr/bin"
}