summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: f0fe06c439b7ccf3543546f5fb154ab13ddfe959 (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
pkgname=ydcv-rs-git
_gitname="ydcv-rs"
pkgdesc="A Rust version of ydcv."
pkgver=0.3.1.55
pkgrel=2
arch=('i686' 'x86_64')
conflicts=("ydcv")
provides=("ydcv")
url="https://github.com/farseerfc/ydcv-rs"
license=('MIT' 'GPL-2.0')
depends=("openssl" "readline")
optdepends=("xsel: for X selection" "libdbus: for desktop notify")
makedepends=('git' 'cargo' 'python-pytoml')
source=('git://github.com/farseerfc/ydcv-rs.git')
sha256sums=('SKIP')

pkgver() {
	cd $_gitname
	echo "$(python -c "print(__import__('pytoml').loads(open('Cargo.toml').read())['package']['version'])").$(git rev-list --count HEAD)"
}

build() {
	cd $_gitname
	cargo build --no-default-features --features "hyper notify-rust" --release
}

package() {
	cd $_gitname
	install -D -m755 "${srcdir}/${_gitname}/target/release/ydcv-rs" "${pkgdir}/usr/bin/ydcv"
}