~alpine/aports

[alpine-aports] [PATCH] testing/ripgrep: new aport

Chloe Kudryavtsev <toast@toastin.space>
Details
Message ID
<20181111054056.28633-1-toast@toastin.space>
Sender timestamp
1541914856
DKIM signature
missing
Download raw message
Patch: +69 -0
A search tool that combines the usability of ag with the raw speed of
grep.
---
 testing/ripgrep/APKBUILD | 69 ++++++++++++++++++++++++++++++++++++++++
 1 file changed, 69 insertions(+)
 create mode 100644 testing/ripgrep/APKBUILD

diff --git a/testing/ripgrep/APKBUILD b/testing/ripgrep/APKBUILD
new file mode 100644
index 0000000000..a1693a8739
--- /dev/null
+++ b/testing/ripgrep/APKBUILD
@@ -0,0 +1,69 @@
# Contributor: Chloe Kudryavtsev <toast@toastin.space>
# Maintainer: Chloe Kudryavtsev <toast@toastin.space>
pkgname=ripgrep
pkgver=0.10.0
pkgrel=0
pkgdesc="A search tool that combines the usability of ag with the raw speed of grep"
url="https://github.com/BurntSushi/ripgrep"
arch="all"
license="MIT Unlicense"
depends=""
makedepends="asciidoc cargo"
install=""
subpackages="
	$pkgname-doc
	$pkgname-bash-completion:bash:noarch
	$pkgname-fish-completion:fish:noarch
	$pkgname-zsh-completion:zsh:noarch
	"
source="$pkgname-$pkgver.tar.gz::https://github.com/BurntSushi/$pkgname/archive/$pkgver.tar.gz"
builddir="$srcdir/$pkgname-$pkgver"

build() {
	cd "$builddir"
	export CARGO_HOME="$srcdir"/cargo
	export RUSTFLAGS="-C target-feature=-crt-static"
	cargo build \
		--release \
		--verbose

	# check() removes all of these, because technically they're just cache
	mv target/release/build/ripgrep-*/out/rg.1 .
	mv target/release/build/ripgrep-*/out/rg.bash .
	mv target/release/build/ripgrep-*/out/rg.fish .
}

check() {
	cd "$builddir"
	export CARGO_HOME="$srcdir"/cargo
	export RUSTFLAGS="-C target-feature=-crt-static"
	cargo test --all \
		--release \
		--verbose
}

package() {
	cd "$builddir"
	install -m755 -D target/release/rg "$pkgdir/usr/bin/rg"
	install -m644 -D rg.1 "$pkgdir/usr/share/man/man1/rg.1"

	install -m644 -D rg.bash "$pkgdir/usr/share/bash-completions/completions/rg"
	install -m644 -D rg.fish "$pkgdir/usr/share/fish/completions/rg.fish"
	install -m644 -D complete/_rg "$pkgdir/usr/share/zsh/site-functions/_rg"
}

bash() {
	mkdir -p "$subpkgdir/usr/share"
	mv "$pkgdir/usr/share/bash-completions" "$subpkgdir/usr/share/"
}

fish() {
	mkdir -p "$subpkgdir/usr/share"
	mv "$pkgdir/usr/share/fish" "$subpkgdir/usr/share/"
}

zsh() {
	mkdir -p "$subpkgdir/usr/share"
	mv "$pkgdir/usr/share/zsh" "$subpkgdir/usr/share/"
}
sha512sums="bc193d269131823076fdb857f69a95c165e88848896379039218139136028e3705e09f1b9be33903e060c8cc37ad5b992ea70a05f6f01c6210bef535a35570c0  ripgrep-0.10.0.tar.gz"
-- 
2.19.1



---
Unsubscribe:  alpine-aports+unsubscribe@lists.alpinelinux.org
Help:         alpine-aports+help@lists.alpinelinux.org
---
Reply to thread Export thread (mbox)