[arch-commits] Commit in (pastel pastel/repos pastel/trunk pastel/trunk/PKGBUILD)
George Rawlinson
grawlinson at gemini.archlinux.org
Sun Jan 9 06:31:21 UTC 2022
Date: Sunday, January 9, 2022 @ 06:31:20
Author: grawlinson
Revision: 1098263
addpkg: pastel 0.8.1-2
Added:
pastel/
pastel/repos/
pastel/trunk/
pastel/trunk/PKGBUILD
----------+
PKGBUILD | 70 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 70 insertions(+)
Added: pastel/trunk/PKGBUILD
===================================================================
--- pastel/trunk/PKGBUILD (rev 0)
+++ pastel/trunk/PKGBUILD 2022-01-09 06:31:20 UTC (rev 1098263)
@@ -0,0 +1,70 @@
+# Maintainer: George Rawlinson <grawlinson at archlinux.org>
+# Contributor: Wesley Moore <wes at wezm.net>
+
+pkgbase=pastel
+pkgname=('pastel' 'pastel-docs')
+pkgver=0.8.1
+pkgrel=2
+pkgdesc="A command-line tool to generate, analyze, convert and manipulate colors"
+arch=('x86_64')
+url="https://github.com/sharkdp/pastel"
+license=('MIT' 'Apache')
+makedepends=('git' 'rust')
+_commit='230e2147f649074c27d94f761de5e39d1cda0886'
+source=("$pkgbase::git+$url.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"
+ SHELL_COMPLETIONS_DIR="$PWD/completions" cargo build --release --frozen
+}
+
+check() {
+ cd "$pkgbase"
+ cargo test --frozen
+}
+
+package_pastel() {
+ depends=('gcc-libs')
+ cd "$pkgbase"
+
+ # binary
+ install -vDm755 -t "$pkgdir/usr/bin" "target/release/$pkgname"
+
+ # shell completions
+ install -vDm644 completions/_pastel \
+ "$pkgdir/usr/share/zsh/site-functions/_pastel"
+ install -vDm644 completions/pastel.bash \
+ "$pkgdir/usr/share/bash-completion/completions/pastel"
+ install -vDm644 completions/pastel.fish \
+ "$pkgdir/usr/share/fish/vendor_completions.d/pastel.fish"
+
+ # licenses
+ install -vDm644 -t "$pkgdir/usr/share/licenses/$pkgname" LICENSE*
+}
+
+package_pastel-docs() {
+ pkgdesc+=' (documentation)'
+ depends=('bash')
+
+ cd "$pkgbase"
+
+ # documentation
+ install -vDm644 -t "$pkgdir/usr/share/doc/$pkgname" ./*.md
+ cp -vr doc "$pkgdir/usr/share/doc/$pkgname"
+
+ # licenses
+ install -vDm644 -t "$pkgdir/usr/share/licenses/$pkgname" LICENSE*
+}
More information about the arch-commits
mailing list