summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorDanilo Bargen2020-01-23 11:39:26 +0100
committerDanilo Bargen2020-01-23 11:58:09 +0100
commit0e09eed92f2012b867f8e654b773fff9d2ae81a9 (patch)
treed963117f0d988eef6f8a316b0e60679cdc0e4877 /PKGBUILD
parentb1d18f01832f464e780878ee58b98b775d9fddb9 (diff)
downloadaur-0e09eed92f2012b867f8e654b773fff9d2ae81a9.tar.gz
Version r204.7a3a565-1
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD28
1 files changed, 16 insertions, 12 deletions
diff --git a/PKGBUILD b/PKGBUILD
index f64026f53e3..446c3ec82f9 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,7 +1,8 @@
# Maintainer: Danilo Bargen <aur at dbrgn dot ch>
pkgname=tealdeer-git
_name=tealdeer
-pkgver=r150.c1ca5ce
+_binname=tldr
+pkgver=r204.7a3a565
pkgrel=1
pkgdesc="A fast TLDR client written in Rust."
arch=('x86_64' 'i686')
@@ -10,32 +11,35 @@ license=('MIT' 'Apache')
depends=()
makedepends=('git' 'rust' 'cargo')
provides=('tldr')
-conflicts=('nodejs-tldr' 'nodejs-tldr-git' 'tealdeer' 'tldr-bash-git' 'tldr-cpp-client'
- 'tldr-git' 'tldr-go-client-git' 'tldr-python-client')
+conflicts=('tldr')
options=(!emptydirs)
source=('git+https://github.com/dbrgn/tealdeer')
-md5sums=('SKIP')
+sha256sums=('SKIP')
build() {
- cd "$srcdir/$_name"
+ cd "$srcdir/$_name" || exit 1
+
+ # Patch version
sed -i 's/^version = "\(.*\)"/version = "\1-aur-'${pkgver}'"/' Cargo.toml
+
+ # Build a release build
cargo build --release
}
package() {
- cd "$srcdir/$_name"
+ cd "$srcdir/$_name" || exit 1
# Install binary
- mkdir -p $pkgdir/usr/bin
- install -o root -g root -m 755 target/release/tldr $pkgdir/usr/bin
+ install -D -o root -g root -m 755 target/release/tldr "$pkgdir/usr/bin/${_binname}"
- # Install bash completions
- mkdir -p $pkgdir/usr/share/bash-completion/completions
- install -o root -g root -m 644 bash_tealdeer $pkgdir/usr/share/bash-completion/completions/tldr
+ # Install shell completions
+ install -D -o root -g root -m 644 bash_tealdeer "$pkgdir/usr/share/bash-completion/completions/${_binname}"
+ install -D -o root -g root -m 644 fish_tealdeer "${pkgdir}/usr/share/fish/completions/${_binname}.fish"
+ install -D -o root -g root -m 644 zsh_tealdeer "${pkgdir}/usr/share/zsh/site-functions/_${_binname}"
}
pkgver() {
- cd "$srcdir/$_name"
+ cd "$srcdir/$_name" || exit 1
printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}