diff options
author | Dan Beste | 2017-10-30 12:47:31 -0500 |
---|---|---|
committer | Dan Beste | 2017-11-01 14:13:46 -0500 |
commit | 8a387ed6543923e1b1ac0f35fe997ba4c495aea6 (patch) | |
tree | 2d8e417dbf376a67a9957053319c5c3575079af9 /PKGBUILD | |
parent | 524e34c9bfb829413c6ae4584c9a1ce58c18343f (diff) | |
download | aur-8a387ed6543923e1b1ac0f35fe997ba4c495aea6.tar.gz |
v5.0.0.r3.gc022528
* General cleanup
* Brought pkgver() in line with ArchLinux's VCS guidelines:
wiki.archlinux.org/index.php/VCS_package_guidelines
* Add check()
* Add vim modeline
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 62 |
1 files changed, 44 insertions, 18 deletions
@@ -1,26 +1,52 @@ -# Maintainer: Wesley Moore <wes@wezm.net> -_pkgname=fd -pkgname=fd-rs-git -pkgver=119 -pkgrel=2 +# Maintainer: Dan Beste <dan.ray.beste@gmail.com> + +pkgname='fd-rs-git' +pkgver=5.0.0.r3.gc022528 +pkgrel=1 pkgdesc='A simple, fast and user-friendly alternative to find.' arch=('i686' 'x86_64') -url="https://github.com/sharkdp/fd" -license=('MIT') -depends=() -conflicts=('fd' 'fd-rs') -provides=('fd-rs') -makedepends=('rust' 'cargo' 'git') -source=("git+https://github.com/sharkdp/fd.git") -md5sums=('SKIP') +url='https://github.com/sharkdp/fd' +license=('APACHE' 'MIT') +makedepends=('git' 'rust') +provides=("${pkgname/-git}") +conflicts=("${pkgname/-git}") +source=("${pkgname}::git+https://github.com/sharkdp/fd.git") +sha256sums=('SKIP') pkgver() { - cd "$srcdir/$_pkgname" - git rev-list --count HEAD + cd "${pkgname}" + + git describe --long --tags \ + | sed 's/v//g;s/\([^-]*-g\)/r\1/;s/-/./g' +} + +build() { + cd "${pkgname}" + + cargo build --release +} + +check() { + cd "${pkgname}" + + cargo test } package() { - cd "$srcdir/$_pkgname" - cargo build --release - install -Dm755 "$srcdir/$_pkgname/target/release/$_pkgname" "$pkgdir/usr/bin/$_pkgname" + cd "${pkgname}" + + install -d "${pkgdir}/usr/bin" + install -d "${pkgdir}/usr/share/licenses/${pkgname}" + + install -m 755 \ + "target/release/${pkgname/-rs-git}" \ + "${pkgdir}/usr/bin/${pkgname/-rs-git}" + install -m 644 \ + LICENSE-APACHE \ + "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE-APACHE" + install -m 644 \ + LICENSE-MIT \ + "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE-MIT" } + +# vim: ts=2 sw=2 et: |