PKGBUILDs/extra/fzf/PKGBUILD

83 lines
2.5 KiB
Bash
Raw Normal View History

2021-02-05 00:33:20 +00:00
# Maintainer: Thore Bödecker <foxxx0@archlinux.org>
# Maintainer: Morten Linderud <foxboron@archlinux.org>
# Maintainer: Filipe Laíns (FFY00) <lains@archlinux.org>
# Contributor: Pierre Neidhardt <ambrevar@gmail.com>
# Contributor: Hermann Zahnweh (eigengrau)
# Contributor: Andy Weidenbaum <archbaum@gmail.com>
# Contributor: foalsrock <foalsrock at gmail dot-com>
# Contributor: jebaum <jebaum at ucla dot edu>
# ALARM: Kevin Mihelich <kevin@archlinuxarm.org>
# - generalize arch-dependent install line
pkgname=fzf
2024-11-16 16:21:58 +00:00
pkgver=0.56.3
2022-07-23 14:23:23 +00:00
pkgrel=1
2021-02-05 00:33:20 +00:00
pkgdesc='Command-line fuzzy finder'
arch=('x86_64')
url='https://github.com/junegunn/fzf'
license=('MIT')
depends=('bash')
makedepends=('git' 'go')
optdepends=('fish: fish keybindings'
'tmux: fzf-tmux script for launching fzf in a tmux pane'
'vim: plugin'
'zsh: zsh keybindings')
2023-01-24 19:19:21 +00:00
options=(!lto)
2024-07-14 21:20:22 +00:00
source=("git+https://github.com/junegunn/fzf.git#tag=v${pkgver}?signed")
2024-08-02 10:25:33 +00:00
validpgpkeys=('B5FB4AB5F32EC1A0C9DE9637254BC280FEF9C627') # Junegunn Choi <junegunn.c@gmail.com>
2024-11-16 16:21:58 +00:00
sha512sums=('5af67c8b77d6dd34014510917d0ecd9e24964474611d56347c282d79e8c2fe75d4673fc262c51c28d1c9e38afe85f6cd7e6ed86394ef1bc2989c40e3490da213')
2021-02-05 00:33:20 +00:00
prepare() {
cd "${pkgname}"
sed -i 's/-w /-w -linkmode external /' Makefile
}
build() {
cd "${pkgname}"
export CGO_LDFLAGS="${LDFLAGS}"
export CGO_CFLAGS="${CFLAGS}"
export CGO_CPPFLAGS="${CPPFLAGS}"
export CGO_CXXFLAGS="${CXXFLAGS}"
export GOFLAGS="-buildmode=pie -trimpath -mod=readonly -modcacherw"
make
}
check() {
cd "${pkgname}"
export CGO_LDFLAGS="${LDFLAGS}"
export CGO_CFLAGS="${CFLAGS}"
export CGO_CPPFLAGS="${CPPFLAGS}"
export CGO_CXXFLAGS="${CXXFLAGS}"
export GOFLAGS="-buildmode=pie -trimpath -mod=readonly -modcacherw"
go test ./...
}
package() {
cd "${pkgname}"
## Man page
install -Dm644 man/man1/fzf.1 "$pkgdir"/usr/share/man/man1/fzf.1
2021-10-09 14:33:30 +00:00
install -Dm644 man/man1/fzf-tmux.1 "$pkgdir"/usr/share/man/man1/fzf-tmux.1
2021-02-05 00:33:20 +00:00
## License
install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/fzf/LICENSE
## Binaries
install -dm755 "$pkgdir"/usr/bin
install -m755 bin/fzf-tmux "$pkgdir"/usr/bin/
install -Dm755 target/fzf-linux_* "$pkgdir"/usr/bin/fzf
## Completion and keybindings
install -dm755 "$pkgdir"/usr/share/fzf
install -m644 shell/*.bash shell/*.zsh "$pkgdir"/usr/share/fzf
## Fish keybindings
install -Dm644 shell/key-bindings.fish "$pkgdir"/usr/share/fish/vendor_functions.d/fzf_key_bindings.fish
## Vim plugin
install -Dm644 doc/fzf.txt "$pkgdir"/usr/share/vim/vimfiles/doc/fzf.txt
install -Dm644 plugin/fzf.vim "$pkgdir"/usr/share/vim/vimfiles/plugin/fzf.vim
}