meshname-0.2.0.ebuild 854 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. # Copyright 2021-2024 Gentoo Authors
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=8
  4. inherit go-module systemd
  5. DESCRIPTION="A universal naming system for all IPv6-based mesh networks"
  6. HOMEPAGE="https://github.com/zhoreeq/meshname"
  7. SRC_URI="
  8. https://github.com/zhoreeq/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz
  9. https://github.com/dm9pZCAq/gentoo-go-deps/releases/download/${P}/${P}-deps.tar.xz
  10. https://github.com/dm9pZCAq/gentoo-go-deps/releases/download/${P}/${P}-vendor.tar.xz
  11. "
  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. }