beego-1.6.0_p20160126.ebuild 4.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. # Copyright 1999-2016 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=5
  4. inherit golang-build
  5. KEYWORDS="~amd64"
  6. EGO_PN="github.com/astaxie/beego/..."
  7. EGIT_COMMIT="fbb98fbe1fe5f6a4209772b44e2547714992340c"
  8. SRC_URI="https://${EGO_PN%/*}/archive/${EGIT_COMMIT}.tar.gz -> ${P}.tar.gz
  9. https://github.com/bradfitz/gomemcache/archive/fb1f79c6b65acda83063cbc69f6bba1522558bfc.tar.gz -> gomemcache-fb1f79c6b65acda83063cbc69f6bba1522558bfc.tar.gz
  10. https://github.com/garyburd/redigo/archive/836b6e58b3358112c8291565d01c35b8764070d7.tar.gz -> redigo-836b6e58b3358112c8291565d01c35b8764070d7.tar.gz
  11. https://github.com/beego/x2j/archive/a0352aadc5420072ebe692481a5d6913d77f8cf0.tar.gz -> x2j-a0352aadc5420072ebe692481a5d6913d77f8cf0.tar.gz
  12. https://github.com/beego/goyaml2/archive/5545475820ddd4db3f90a4900d44b65d077d702d.tar.gz -> goyaml2-5545475820ddd4db3f90a4900d44b65d077d702d.tar.gz
  13. https://github.com/wendal/errors/archive/f66c77a7882b399795a8987ebf87ef64a427417e.tar.gz -> errors-f66c77a7882b399795a8987ebf87ef64a427417e.tar.gz
  14. https://github.com/belogik/goes/archive/e54d722c3aff588e4c737fe11c07359019240824.tar.gz -> goes-e54d722c3aff588e4c737fe11c07359019240824.tar.gz
  15. https://github.com/couchbase/go-couchbase/archive/8cefc09994885b63d45e506861277e9743addd37.tar.gz -> go-couchbase-8cefc09994885b63d45e506861277e9743addd37.tar.gz
  16. https://github.com/couchbase/gomemcached/archive/eb29b2e515a50fded2382cbd79a369c0cb3abf41.tar.gz -> gomemcached-eb29b2e515a50fded2382cbd79a369c0cb3abf41.tar.gz
  17. https://github.com/siddontang/ledisdb/archive/713b22910a0b66d098c9e40ff19be258968e9a7d.tar.gz -> ledisdb-713b22910a0b66d098c9e40ff19be258968e9a7d.tar.gz
  18. https://github.com/BurntSushi/toml/archive/5c4df71dfe9ac89ef6287afc05e4c1b16ae65a1e.tar.gz -> toml-5c4df71dfe9ac89ef6287afc05e4c1b16ae65a1e.tar.gz
  19. https://github.com/boltdb/bolt/archive/2f846c3551b76d7710f159be840d66c3d064abbe.tar.gz -> bolt-2f846c3551b76d7710f159be840d66c3d064abbe.tar.gz
  20. https://github.com/edsrzf/mmap-go/archive/903d080718bd2877583fe1bd0a19c9cd3e2906ff.tar.gz -> mmap-go-903d080718bd2877583fe1bd0a19c9cd3e2906ff.tar.gz
  21. https://github.com/siddontang/go/archive/354e14e6c093c661abb29fd28403b3c19cff5514.tar.gz -> siddontang-go-354e14e6c093c661abb29fd28403b3c19cff5514.tar.gz
  22. https://github.com/siddontang/rdb/archive/fc89ed2e418d27e3ea76e708e54276d2b44ae9cf.tar.gz -> siddontang-rdb-fc89ed2e418d27e3ea76e708e54276d2b44ae9cf.tar.gz
  23. https://github.com/syndtr/goleveldb/archive/36d2ead1e477af53df038bdde5f7b5b3790c93dd.tar.gz -> goleveldb-36d2ead1e477af53df038bdde5f7b5b3790c93dd.tar.gz
  24. https://github.com/cupcake/rdb/archive/f5614b4eb12a23e0c65b51f7c22635ef1a16f725.tar.gz -> rdb-f5614b4eb12a23e0c65b51f7c22635ef1a16f725.tar.gz
  25. https://github.com/golang/snappy/archive/894fd4616c897c201d223c3c0c128e8c648c96a2.tar.gz -> golang-snappy-894fd4616c897c201d223c3c0c128e8c648c96a2.tar.gz
  26. https://github.com/go-sql-driver/mysql/archive/267b128680c46286b9ca13475c3cca5de8f79bd7.tar.gz -> go-mysql-267b128680c46286b9ca13475c3cca5de8f79bd7.tar.gz
  27. https://github.com/lib/pq/archive/f59175c2986495ff94109dee3835c504a96c3e81.tar.gz -> pq-f59175c2986495ff94109dee3835c504a96c3e81.tar.gz
  28. https://github.com/mattn/go-sqlite3/archive/c5aee9649735e8dadac55eb968ccebd9fa29a881.tar.gz -> go-sqlite3-1.1.0_p20160131.tar.gz"
  29. DESCRIPTION="High-performance web framework for Go"
  30. HOMEPAGE="https://${EGO_PN%/*}"
  31. LICENSE="Apache-2.0"
  32. SLOT="0/${PVR}"
  33. IUSE=""
  34. RESTRICT="test"
  35. get_archive_go_package() {
  36. local archive=${1} uri x
  37. for x in ${SRC_URI}; do
  38. if [[ ${x} == http* ]]; then
  39. uri=${x}
  40. elif [[ ${x} == ${archive} ]]; then
  41. break
  42. fi
  43. done
  44. uri=${uri#https://}
  45. echo ${uri%/archive/*}
  46. }
  47. unpack_go_packages() {
  48. local go_package x
  49. # Unpack packages to appropriate locations for GOPATH
  50. for x in ${A}; do
  51. unpack ${x}
  52. if [[ ${x} == *.tar.gz ]]; then
  53. go_package=$(get_archive_go_package ${x})
  54. mkdir -p "${S}/src/${go_package%/*}"
  55. for x in ${go_package##*/}-*; do
  56. [[ ${x} -ef ${S} ]] && continue
  57. mv "${x}" "${S}/src/${go_package}" || die
  58. done
  59. fi
  60. done
  61. }
  62. src_unpack() {
  63. unpack_go_packages
  64. }
  65. golang_install_pkgs() {
  66. insopts -m0644 -p # preserve timestamps for bug 551486
  67. insinto $(dirname "${EPREFIX}$(get_golibdir)/pkg/$(go env GOOS)_$(go env GOARCH)/${EGO_PN%/*}")
  68. doins -r "${S}"/pkg/$(go env GOOS)_$(go env GOARCH)/${EGO_PN%/*}{,.a}
  69. insinto $(dirname "${EPREFIX}$(get_golibdir)/src/${EGO_PN%/*}")
  70. doins -r "${S}"/src/${EGO_PN%/*}
  71. }