You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

48 lines
1.1 KiB

  1. # Maintainer: James An <james@jamesan.ca>
  2. pkgname=git-subrepo-git
  3. _pkgname=${pkgname%-git}
  4. pkgver=0.4.3.r1.g2f68596
  5. pkgrel=1
  6. pkgdesc='Git Submodule Alternative'
  7. arch=('any')
  8. url="https://github.com/ingydotnet/$_pkgname"
  9. license=('GPL')
  10. provides=("$_pkgname=$pkgver")
  11. conflicts=("$_pkgname")
  12. source=("$_pkgname"::"git+$url.git")
  13. md5sums=('SKIP')
  14. depends=(git)
  15. pkgver() {
  16. cd "$_pkgname"
  17. (
  18. set -o pipefail
  19. git describe --long --tag | sed -r 's/([^-]*-g)/r\1/;s/-/./g' ||
  20. printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
  21. )
  22. }
  23. build() {
  24. cd "$_pkgname"
  25. make compgen
  26. }
  27. check() {
  28. cd "$_pkgname"
  29. make test
  30. }
  31. package() {
  32. cd "$_pkgname"
  33. make DESTDIR="$pkgdir" PREFIX=/usr install
  34. install -d -m 0755 "$pkgdir"/usr/share/bash-completion/completions
  35. install -C -m 0644 share/completion.bash "$pkgdir"/usr/share/bash-completion/completions/git-subrepo
  36. install -d -m 0755 "$pkgdir"/usr/share/zsh/site-functions
  37. install -C -m 0644 share/zsh-completion/_git-subrepo "$pkgdir"/usr/share/zsh/site-functions/_git-subrepo
  38. }