go-mtpfs-9999.ebuild 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. # Copyright 1999-2015 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=5
  4. inherit git-r3 flag-o-matic toolchain-funcs
  5. DESCRIPTION="a simple FUSE filesystem for mounting Android devices as a MTP device"
  6. HOMEPAGE="https://github.com/hanwen/go-mtpfs"
  7. EGIT_REPO_URI="https://github.com/hanwen/go-mtpfs.git"
  8. LICENSE="BSD"
  9. SLOT="0"
  10. KEYWORDS=""
  11. IUSE=""
  12. COMMON_DEPEND="virtual/libusb
  13. virtual/udev"
  14. DEPEND="${COMMON_DEPEND}
  15. dev-libs/go-fuse
  16. dev-libs/go-usb
  17. dev-lang/go
  18. media-libs/libmtp"
  19. RDEPEND="${COMMON_DEPEND}"
  20. #Tests require a connected mtp device
  21. RESTRICT="test"
  22. GO_PN="github.com/hanwen/${PN}"
  23. EGIT_CHECKOUT_DIR="${S}/src/${GO_PN}"
  24. QA_FLAGS_IGNORED=usr/bin/go-mtpfs
  25. export GOPATH="${S}"
  26. src_compile() {
  27. go build -ldflags '-extldflags=-fno-PIC' -v -x -work ${GO_PN} || die
  28. }
  29. src_test() {
  30. go test -ldflags '-extldflags=-fno-PIC' ${GO_PN}/fs || die
  31. go test -ldflags '-extldflags=-fno-PIC' ${GO_PN}/usb || die
  32. go test -ldflags '-extldflags=-fno-PIC' ${GO_PN}/mtp || die
  33. }
  34. src_install() {
  35. dobin go-mtpfs
  36. }