1
0
mirror of https://github.com/BurntSushi/ripgrep.git synced 2025-01-08 13:23:34 +02:00
ripgrep/pkg/archlinux/PKGBUILD

38 lines
1.3 KiB
Bash
Raw Normal View History

2016-09-22 02:19:29 +02:00
# Contributor: Andrew Gallant <jamslam@gmail.com>
# Maintainer: Andrew Gallant
pkgname=ripgrep
2016-10-14 03:01:49 +02:00
pkgver=0.2.3
2016-09-22 02:19:29 +02:00
pkgrel=1
pkgdesc="A search tool that combines the usability of The Silver Searcher with the raw speed of grep."
arch=('i686' 'x86_64')
url="https://github.com/BurntSushi/ripgrep"
license=('UNLICENSE')
makedepends=('cargo')
source=("https://github.com/BurntSushi/$pkgname/archive/$pkgver.tar.gz")
2016-10-14 03:01:49 +02:00
sha256sums=('a88531558d2023df76190ea2e52bee50d739eabece8a57df29abbad0c6bdb917')
2016-09-22 02:19:29 +02:00
build() {
cd "$pkgname-$pkgver"
if command -v rustup > /dev/null 2>&1; then
RUSTFLAGS="-C target-cpu=native" rustup run nightly \
cargo build --release --features simd-accel
elif rustc --version | grep -q nightly; then
RUSTFLAGS="-C target-cpu=native" \
cargo build --release --features simd-accel
else
cargo build --release
fi
}
package() {
cd "$pkgname-$pkgver"
install -Dm755 "target/release/rg" "$pkgdir/usr/bin/rg"
2016-09-23 00:17:46 +02:00
install -Dm644 "doc/rg.1" "$pkgdir/usr/share/man/man1/rg.1"
2016-10-14 03:01:49 +02:00
install -Dm644 "README.md" "$pkgdir/usr/share/doc/ripgrep/README.md"
2016-09-22 02:19:29 +02:00
install -Dm644 "COPYING" "$pkgdir/usr/share/doc/ripgrep/COPYING"
install -Dm644 "LICENSE-MIT" "$pkgdir/usr/share/doc/ripgrep/LICENSE-MIT"
install -Dm644 "UNLICENSE" "$pkgdir/usr/share/doc/ripgrep/UNLICENSE"
2016-10-14 03:01:49 +02:00
install -Dm644 "CHANGELOG.md" "$pkgdir/usr/share/doc/ripgrep/CHANGELOG.md"
2016-09-22 02:19:29 +02:00
}