Advertisement
otaj

protoc-gen-doc-git PKGBUILD

Mar 14th, 2019
112
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.96 KB | None | 0 0
  1. pkgname=protoc-gen-doc-fixed-git
  2. _gitname=protoc-gen-doc
  3. _username=estan
  4. pkgver=372.c35c052
  5. pkgrel=1
  6. pkgdesc="A documentation generator plugin for Google Protocol Buffers."
  7. arch=('any')
  8. url="https://github.com/estan/protoc-gen-doc"
  9. makedepends=('go' 'dep')
  10. license=('LGPL')
  11. source=("git+https://github.com/estan/protoc-gen-doc.git")
  12. sha256sums=('SKIP')
  13.  
  14.  
  15.  
  16. prepare(){
  17.   mkdir -p gopath/src/$_username/
  18.   ln -rTsf $_gitname gopath/src/$_username/$_gitname
  19.   export GOPATH="$srcdir"/gopath
  20.   cd gopath/src/$_username/$_gitname
  21.   dep ensure
  22. }
  23.  
  24. build() {
  25.   export GOPATH="$srcdir"/gopath
  26.   cd gopath/src/$_username/$_gitname
  27.   go install \
  28.     -gcflags "all=-trimpath=$GOPATH" \
  29.     -asmflags "all=-trimpath=$GOPATH" \
  30.     -ldflags "-extldflags $LDFLAGS" \
  31.     -v ./...
  32. }
  33.  
  34.  
  35. package() {
  36.   install -Dm755 gopath/bin/$_gitname "$pkgdir"/usr/bin/$_gitname
  37. }
  38.  
  39. pkgver() {
  40.     cd $_gitname
  41.     echo $(git rev-list --count HEAD).$(git rev-parse --short HEAD)
  42. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement