summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD62
1 files changed, 44 insertions, 18 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 0af6766a20fd..2a23359bb74a 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -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: