Date: Tuesday, November 1, 2022 @ 22:58:48
  Author: felixonmars
Revision: 1340634

archrelease: copy trunk to community-staging-x86_64

Added:
  sheldon/repos/community-staging-x86_64/
  sheldon/repos/community-staging-x86_64/PKGBUILD
    (from rev 1340632, sheldon/trunk/PKGBUILD)

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

Copied: sheldon/repos/community-staging-x86_64/PKGBUILD (from rev 1340632, 
sheldon/trunk/PKGBUILD)
===================================================================
--- community-staging-x86_64/PKGBUILD                           (rev 0)
+++ community-staging-x86_64/PKGBUILD   2022-11-01 22:58:48 UTC (rev 1340634)
@@ -0,0 +1,73 @@
+# Maintainer: George Rawlinson <[email protected]>
+
+pkgbase=sheldon
+pkgname=('sheldon' 'sheldon-docs')
+pkgver=0.7.0
+pkgrel=2
+pkgdesc='A fast and configurable shell plugin manager'
+arch=('x86_64')
+url='https://sheldon.cli.rs'
+license=('Apache' 'MIT')
+makedepends=('git' 'rust' 'mdbook-linkcheck' 'curl')
+options=('!lto')
+_commit='1d91370e0b63da3c5a1e5fd63f7292bbb7ff7168'
+source=("git+https://github.com/rossmacarthur/sheldon.git#commit=$_commit";)
+b2sums=('SKIP')
+
+pkgver() {
+  cd "$pkgbase"
+
+  git describe --tags | sed 's/^v//'
+}
+
+prepare() {
+  cd "$pkgbase"
+
+  # download dependencies
+  cargo fetch --locked --target "$CARCH-unknown-linux-gnu"
+}
+
+build() {
+  cd "$pkgbase"
+
+  # binary
+  cargo build --frozen --release --all-features
+
+  # documentation
+  mdbook build docs
+}
+
+check() {
+  cd "$pkgbase"
+
+  cargo test --frozen --all-features
+}
+
+package_sheldon() {
+  depends=('curl')
+  optdepends=('sheldon-docs: documentation')
+
+  cd "$pkgbase"
+
+  # binary
+  install -vDm755 -t "$pkgdir/usr/bin" "target/release/$pkgbase"
+
+  # license
+  install -vDm644 -t "$pkgdir/usr/share/licenses/$pkgbase" LICENSE*
+
+  # completions
+  install -vDm644 completions/sheldon.bash 
"$pkgdir/usr/share/bash-completion/completions/$pkgbase"
+  install -vDm644 completions/sheldon.zsh 
"$pkgdir/usr/share/zsh/site-functions/_$pkgbase"
+}
+
+package_sheldon-docs() {
+  pkgdesc+=' (documentation)'
+
+  cd "$pkgbase"
+
+  # documentation
+  install -vDm644 -t "$pkgdir/usr/share/doc/$pkgbase" ./*.md
+
+  # html manual
+  cp -vr docs/book/html "$pkgdir/usr/share/doc/$pkgbase"
+}

Reply via email to