[arch-commits] Commit in bat/repos (2 files)

Alexander Rødseth arodseth at gemini.archlinux.org
Wed Aug 17 01:30:46 UTC 2022


    Date: Wednesday, August 17, 2022 @ 01:30:46
  Author: arodseth
Revision: 1266688

archrelease: copy trunk to community-staging-x86_64

Added:
  bat/repos/community-staging-x86_64/
  bat/repos/community-staging-x86_64/PKGBUILD
    (from rev 1266687, bat/trunk/PKGBUILD)

----------+
 PKGBUILD |   55 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 55 insertions(+)

Copied: bat/repos/community-staging-x86_64/PKGBUILD (from rev 1266687, bat/trunk/PKGBUILD)
===================================================================
--- community-staging-x86_64/PKGBUILD	                        (rev 0)
+++ community-staging-x86_64/PKGBUILD	2022-08-17 01:30:46 UTC (rev 1266688)
@@ -0,0 +1,55 @@
+# Maintainer: Alexander F. Rødseth <xyproto at archlinux.org>
+# Contributor: Wesley Moore <wes at wezm.net>
+
+pkgname=bat
+pkgver=0.21.0
+pkgrel=3
+pkgdesc='Cat clone with syntax highlighting and git integration'
+arch=(x86_64)
+url='https://github.com/sharkdp/bat'
+license=(APACHE MIT)
+depends=(libgit2 oniguruma)
+makedepends=(clang cmake git rust)
+source=("git+$url#commit=405e5f74602d8f680168ef52350150921c696d54") # tag: v0.21.0
+b2sums=(SKIP)
+
+prepare() {
+  cargo fetch --locked --manifest-path $pkgname/Cargo.toml
+}
+
+build() {
+  export CFLAGS+=' -ffat-lto-objects -w'
+  cargo build --locked --manifest-path $pkgname/Cargo.toml --release
+}
+
+check() {
+  cargo test --locked --manifest-path $pkgname/Cargo.toml
+}
+
+package() {
+  install -Dm755 $pkgname/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"
+
+  cd $pkgname/target/release/build
+
+  # Find and package the man page (because cargo --out-dir is too new)
+  find . -name bat.1 -type f -exec install -Dm644 {} \
+    "$pkgdir/usr/share/man/man1/bat.1" \;
+
+  # Find and package the bash completion file
+  find . -name bat.bash -type f -exec install -Dm644 {} \
+    "$pkgdir/usr/share/bash-completion/completions/bat" \;
+
+  # Find and package the zsh completion file (not in zsh-completions yet)
+  find . -name bat.zsh -type f -exec install -Dm644 {} \
+    "$pkgdir/usr/share/zsh/site-functions/_bat" \;
+
+  # Find and package the fish completion file
+  find . -name bat.fish -type f -exec install -Dm644 {} \
+    "$pkgdir/usr/share/fish/vendor_completions.d/bat.fish" \;
+}



More information about the arch-commits mailing list