PKGBUILD 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. # Maintainer: Sefa Eyeoglu <contact@scrumplex.net>
  2. # Contributor: Caleb Fontenot <foley2431 at gmail dot com>
  3. # Contributor: Lgmrszd <lgmrszd at gmail dot com>
  4. pkgname=packwiz-git
  5. pkgver=r221.b8d9727
  6. pkgrel=1
  7. pkgdesc="A command line tool for creating minecraft modpacks."
  8. arch=("x86_64")
  9. url="https://packwiz.infra.link/"
  10. license=("custom:MIT")
  11. depends=("glibc")
  12. makedepends=("git" "go")
  13. provides=("${pkgname%-git}")
  14. conflicts=("${pkgname%-git}")
  15. source=("${pkgname%-git}::git+https://github.com/packwiz/packwiz.git")
  16. md5sums=("SKIP")
  17. pkgver() {
  18. cd "${pkgname%-git}"
  19. printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
  20. }
  21. prepare() {
  22. cd "${pkgname%-git}"
  23. mkdir -p "completions"
  24. }
  25. build() {
  26. cd "${pkgname%-git}"
  27. go build \
  28. -trimpath \
  29. -buildmode=pie \
  30. -mod=readonly \
  31. -modcacherw \
  32. -ldflags "-linkmode external -extldflags \"${LDFLAGS}\"" \
  33. .
  34. ./packwiz completion bash > completions/packwiz.bash
  35. ./packwiz completion zsh > completions/packwiz.zsh
  36. ./packwiz completion fish > completions/packwiz.fish
  37. }
  38. package() {
  39. cd "${pkgname%-git}"
  40. install -Dm755 packwiz "$pkgdir/usr/bin/packwiz"
  41. install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
  42. install -Dm644 completions/packwiz.bash "$pkgdir/usr/share/bash-completion/completions/packwiz"
  43. install -Dm644 completions/packwiz.zsh "$pkgdir/usr/share/zsh/site-functions/_packwiz"
  44. install -Dm644 completions/packwiz.fish "$pkgdir/usr/share/fish/vendor_completions.d/packwiz.fish"
  45. }