diff options
author | André Klitzing <aklitzing@gmail.com> | 2017-04-09 19:37:36 +0200 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2018-03-28 15:00:46 +0000 |
commit | 181f866368977e4089c08bb177c5074e607a9af9 (patch) | |
tree | f016604bfd694d0480a4d65d70599d1d5c3142ec /testing/ripgrep | |
parent | 4d73a47ebb24ce3af135311d4897c5de52be23db (diff) | |
download | aports-181f866368977e4089c08bb177c5074e607a9af9.tar.bz2 aports-181f866368977e4089c08bb177c5074e607a9af9.tar.xz |
testing/ripgrep: new aport
Diffstat (limited to 'testing/ripgrep')
-rw-r--r-- | testing/ripgrep/APKBUILD | 64 | ||||
-rw-r--r-- | testing/ripgrep/avoid_issue_448.patch | 12 |
2 files changed, 76 insertions, 0 deletions
diff --git a/testing/ripgrep/APKBUILD b/testing/ripgrep/APKBUILD new file mode 100644 index 0000000000..950e65dbe9 --- /dev/null +++ b/testing/ripgrep/APKBUILD @@ -0,0 +1,64 @@ +# Contributor: André Klitzing <aklitzing@gmail.com> +# Maintainer: André Klitzing <aklitzing@gmail.com> +pkgname=ripgrep +pkgver=0.7.1 +pkgrel=0 +pkgdesc="ripgrep combines the usability of The Silver Searcher with the raw speed of grep" +url="https://github.com/BurntSushi/ripgrep" +arch="x86_64" # limited by cargo pkg +license="MIT public-domain" +makedepends="cargo" +subpackages="$pkgname-doc + $pkgname-bash-completion:bashcomp:noarch + $pkgname-zsh-completion:zshcomp:noarch + $pkgname-fish-completion:fishcomp:noarch" +source="$pkgname-$pkgver.tar.gz::https://github.com/BurntSushi/$pkgname/archive/$pkgver.tar.gz + avoid_issue_448.patch + " # https://github.com/BurntSushi/ripgrep/issues/448 +builddir="$srcdir/"$pkgname-$pkgver + +build() { + cd "$builddir" + cargo build --release +} + +check() { + cd "$builddir" + cargo test +} + +package() { + cd "$builddir" + install -Dm755 "target/release/rg" "$pkgdir/usr/bin/rg" + install -Dm644 "doc/rg.1" "$pkgdir/usr/share/man/man1/rg.1" +} + +bashcomp() { + depends="" + pkgdesc="Bash completions for $pkgname" + install_if="$pkgname=$pkgver-r$pkgrel bash-completion" + + mkdir -p "$subpkgdir"/usr/share/bash-completion/completions/ + install -Dm644 "$builddir/target/release/build/ripgrep-"*/out/rg.bash-completion "$subpkgdir/usr/share/bash-completion/completions/rg" +} + +zshcomp() { + depends="" + pkgdesc="Zsh completions for $pkgname" + install_if="$pkgname=$pkgver-r$pkgrel zsh" + + mkdir -p "$subpkgdir"/usr/share/zsh/site-functions/ + install -Dm644 "$builddir/complete/_rg" "$subpkgdir/usr/share/zsh/site-functions/_rg" +} + +fishcomp() { + depends="" + pkgdesc="Fish completions for $pkgname" + install_if="$pkgname=$pkgver-r$pkgrel fish" + + mkdir -p "$subpkgdir"/usr/share/fish/completions/ + install -Dm644 "$builddir/target/release/build/ripgrep-"*/out/rg.fish "$subpkgdir/usr/share/fish/completions/rg.fish" +} + +sha512sums="1d2c5b1085ebc6b2b0d1cd330583f8d09bae0789590ff3a8bbb7f79c36b106b9f4fb3c880a225fa4f8565cee55e38514db0e7751f1d14a76005ebfa7c7127e5f ripgrep-0.7.1.tar.gz +72414b133db84b1ddb41ddb6e0e470e8383fcca8d83b4cce1022cf1166977ed04f4d0ca874a3d0caa4a7090e642ae2e412c7a45d9c540ba9f4708e880397e5a5 avoid_issue_448.patch" diff --git a/testing/ripgrep/avoid_issue_448.patch b/testing/ripgrep/avoid_issue_448.patch new file mode 100644 index 0000000000..3963e83227 --- /dev/null +++ b/testing/ripgrep/avoid_issue_448.patch @@ -0,0 +1,12 @@ +diff --git a/tests/tests.rs b/tests/tests.rs +index 578dbcb..d456fab 100644 +--- a/tests/tests.rs ++++ b/tests/tests.rs +@@ -721,6 +721,7 @@ clean!(regression_25, "test", ".", |wd: WorkDir, mut cmd: Command| { + wd.create(".gitignore", "/llvm/"); + wd.create_dir("src/llvm"); + wd.create("src/llvm/foo", "test"); ++ wd.create("../.gitignore", "!*"); + + let lines: String = wd.stdout(&mut cmd); + let expected = path("src/llvm/foo:test\n"); |