meshname-0.2.0.ebuild 855 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. # Copyright 2021-2023 Gentoo Authors
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=8
  4. inherit go-module systemd
  5. SRC_URI="
  6. https://github.com/zhoreeq/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz
  7. https://github.com/dm9pZCAq/gentoo-go-deps/releases/download/${P}/${P}-deps.tar.xz
  8. https://github.com/dm9pZCAq/gentoo-go-deps/releases/download/${P}/${P}-vendor.tar.xz
  9. "
  10. DESCRIPTION="A universal naming system for all IPv6-based mesh networks"
  11. HOMEPAGE="https://github.com/zhoreeq/meshname"
  12. LICENSE="MIT"
  13. SLOT="0"
  14. KEYWORDS="amd64 ~x86"
  15. src_compile() {
  16. CGO_ENABLED=0 ego build -ldflags "
  17. -s -w
  18. -extldflags '-static'
  19. " "./cmd/${PN}d"
  20. }
  21. src_test() {
  22. ego test "./pkg/${PN}"/*_test.go
  23. }
  24. src_install() {
  25. local DOCS=( ./*.md )
  26. dobin "${PN}d"
  27. doinitd "contrib/${PN}d.initd"
  28. systemd_dounit "${PN}d.service"
  29. einstalldocs
  30. }