Pkgfile 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. # Description: lf (as in "list files") is a terminal file manager written in Go with a heavy inspiration from ranger file manager.
  2. # URL: https://github.com/gokcehan/lf
  3. # Maintainer: Daniel Azevedo, daniazevedo77 at posteo dot net
  4. # Depends on: git go
  5. name=lf
  6. version=r33
  7. release=1
  8. source=(https://github.com/gokcehan/$name/archive/refs/tags/$version.tar.gz)
  9. build() {
  10. cd $name-$version
  11. mkdir build
  12. export GOPATH="$SRC"
  13. go mod download
  14. export CGO_CPPFLAGS="${CPPFLAGS}"
  15. export CGO_CFLAGS="${CFLAGS}"
  16. export CGO_CXXFLAGS="${CXXFLAGS}"
  17. export GOPATH="$SRC"
  18. go build -v \
  19. -buildmode=pie \
  20. -mod=readonly \
  21. -modcacherw \
  22. -ldflags "-compressdwarf=false \
  23. -linkmode external \
  24. -extldflags '${LDFLAGS}' \
  25. -X main.gVersion=$version" \
  26. -o build \
  27. .
  28. install -vDm755 -t $PKG/usr/bin build/lf
  29. install -vDm644 -t $PKG/usr/share/man/man1 lf.1
  30. install -vDm644 -t $PKG/usr/share/doc/$pkgname README.md etc/lfrc.example
  31. install -vDm644 -t $PKG/usr/share/applications lf.desktop
  32. install -vDm644 -t $PKG/usr/share/vim/vimfiles/syntax etc/lf.vim
  33. install -vDm644 -t $PKG/usr/share/vim/vimfiles/ftdetect etc/lf.vim
  34. install -vDm644 -t $PKG/etc/profile.d etc/*.{sh,csh}
  35. install -vDm644 -t $PKG/usr/share/fish/vendor_functions.d etc/lfcd.fish
  36. install -vDm644 etc/lf.bash $PKG/usr/share/bash-completion/completions/lf
  37. install -vDm644 etc/lf.fish $PKG/usr/share/fish/vendor_completions.d/lf.fish
  38. install -vDm644 etc/lf.zsh $PKG/usr/share/zsh/site-functions/_lf
  39. install -vDm644 -t $PKG/usr/share/licenses/$name LICENSE
  40. rm -rf $PKG/usr/share/doc/README.md
  41. }