[arch-commits] Commit in bat/trunk (PKGBUILD)

Alexander Rødseth arodseth at archlinux.org
Sat Oct 3 10:13:39 UTC 2020


    Date: Saturday, October 3, 2020 @ 10:13:39
  Author: arodseth
Revision: 716477

upgpkg: bat 0.16.0-1

Modified:
  bat/trunk/PKGBUILD

----------+
 PKGBUILD |   37 +++++++++++++++++--------------------
 1 file changed, 17 insertions(+), 20 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2020-10-03 09:58:11 UTC (rev 716476)
+++ PKGBUILD	2020-10-03 10:13:39 UTC (rev 716477)
@@ -2,7 +2,7 @@
 # Contributor: Wesley Moore <wes at wezm.net>
 
 pkgname=bat
-pkgver=0.15.4
+pkgver=0.16.0
 pkgrel=1
 pkgdesc='Cat clone with syntax highlighting and git integration'
 arch=(x86_64)
@@ -9,34 +9,31 @@
 url='https://github.com/sharkdp/bat'
 license=(APACHE MIT)
 makedepends=(clang cmake git rust)
-source=("git+$url#commit=9e65ecd03e60336bd54dea12fbc4354c4fb8d8b0") # tag: v0.15.4
+source=("git+$url#commit=6258dda0f851256c2e1d65cf87e997023a4f997b") # tag: v0.16.0
 sha256sums=('SKIP')
 
 build() {
-  cd $pkgname
-  cargo build --release
+  cargo build \
+    --manifest-path "$srcdir/$pkgname/Cargo.toml" \
+    --release
 }
 
 package() {
-  cd $pkgname
+  install -Dm755 $pkgname/target/release/$pkgname "$pkgdir/usr/bin/$pkgname"
 
-  # Package the executable
-  install -Dm755 target/release/$pkgname "$pkgdir/usr/bin/$pkgname"
+  # Package licenses
+  install -Dm644 $pkgname/LICENSE-APACHE \
+    "$pkgdir/usr/share/licenses/$pkgname/LICENSE-APACHE"
+  install -Dm644 $pkgname/LICENSE-MIT \
+    "$pkgdir/usr/share/licenses/$pkgname/LICENSE-MIT"
 
   # Package the man page
-  find "$srcdir" -name bat.1 -exec install -Dm644 {} \
-    "$pkgdir/usr/share/man/man1/bat.1" \;
+  find $pkgname/target/release -name bat.1 -type f \
+    -exec install -Dm644 {} "$pkgdir/usr/share/man/man1/bat.1" \;
 
-  # Package the license files
-  install -Dm644 LICENSE-APACHE \
-    "$pkgdir/usr/share/licenses/$pkgname/LICENSE-APACHE"
-  install -Dm644 LICENSE-MIT \
-    "$pkgdir/usr/share/licenses/$pkgname/LICENSE-MIT"
+  # Package the zsh completion file (not in zsh-completions yet)
+  find $pkgname/target/release -name bat.zsh -type f \
+    -exec install -Dm644 {} "$pkgdir/usr/share/zsh/site-functions/_bat" \;
 
-  # Package the fish completion file (already included in fish)
-  #find "$srcdir" -name bat.fish -exec install -Dm644 {} \
-  #  "$pkgdir/usr/share/fish/completions/bat.fish" \;
+  # The fish completion file is already included in fish
 }
-
-# getver: github.com/sharkdp/bat/releases/latest
-# vim: ts=2 sw=2 et:



More information about the arch-commits mailing list