meshname-0.1.2.ebuild 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. # Copyright 2021 Gentoo Authors
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=7
  4. inherit go-module systemd
  5. EGO_SUM=(
  6. "github.com/gologme/log v1.2.0"
  7. "github.com/gologme/log v1.2.0/go.mod"
  8. "github.com/miekg/dns v1.1.27"
  9. "github.com/miekg/dns v1.1.27/go.mod"
  10. "golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod"
  11. "golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550"
  12. "golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod"
  13. "golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod"
  14. "golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod"
  15. "golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod"
  16. "golang.org/x/net v0.0.0-20190923162816-aa69164e4478"
  17. "golang.org/x/net v0.0.0-20190923162816-aa69164e4478/go.mod"
  18. "golang.org/x/sync v0.0.0-20190423024810-112230192c58"
  19. "golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod"
  20. "golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod"
  21. "golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod"
  22. "golang.org/x/sys v0.0.0-20190924154521-2837fb4f24fe"
  23. "golang.org/x/sys v0.0.0-20190924154521-2837fb4f24fe/go.mod"
  24. "golang.org/x/text v0.3.0/go.mod"
  25. "golang.org/x/tools v0.0.0-20191216052735-49a3e744a425/go.mod"
  26. "golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod"
  27. )
  28. go-module_set_globals
  29. SRC_URI="
  30. https://github.com/zhoreeq/${PN}/archive/refs/tags/v${PV}.tar.gz
  31. -> ${P}.tar.gz
  32. ${EGO_SUM_SRC_URI}
  33. "
  34. DESCRIPTION="A universal naming system for all IPv6-based mesh networks"
  35. HOMEPAGE="https://github.com/zhoreeq/meshname"
  36. LICENSE="MIT"
  37. SLOT="0"
  38. KEYWORDS="amd64 ~x86"
  39. go_cmd() {
  40. local myflags=(
  41. -ldflags '-s -w'
  42. )
  43. local cmd="${1:?}" && shift
  44. local go_cmd=( go "${cmd}" "${myflags[@]}" "${@}" )
  45. einfo "${go_cmd[*]}"
  46. CGO_ENABLED=0 "${go_cmd[@]}" || die
  47. }
  48. src_compile() {
  49. go_cmd build "./cmd/${PN}d"
  50. }
  51. src_test() {
  52. go_cmd test "./pkg/${PN}"/*_test.go
  53. }
  54. src_install() {
  55. local DOCS=( *.md )
  56. dobin "${PN}d"
  57. doinitd "contrib/${PN}d.initd"
  58. systemd_dounit "${PN}d.service"
  59. einstalldocs
  60. }