libftd2xx-0.4.16-r1.ebuild 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. # Copyright 1999-2013 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=5
  4. inherit multilib
  5. MY_P="${PN}${PV}"
  6. DESCRIPTION="Library that allows a direct access to a USB device"
  7. HOMEPAGE="http://www.ftdichip.com/Drivers/D2XX.htm"
  8. SRC_URI="amd64? ( http://www.ftdichip.com/Drivers/D2XX/Linux/${MY_P}_x86_64.tar.gz )
  9. x86? ( http://www.ftdichip.com/Drivers/D2XX/Linux/${MY_P}.tar.gz )"
  10. LICENSE="FTDI LGPL-2.1+"
  11. SLOT="0"
  12. KEYWORDS="~amd64 ~x86"
  13. IUSE="examples"
  14. QA_PREBUILT="*"
  15. S=${WORKDIR}
  16. src_install() {
  17. use x86 && cd ${MY_P}
  18. use amd64 && cd ${MY_P}_x86_64
  19. into /opt
  20. dolib.so ${PN}.so.${PV}
  21. dosym ${PN}.so.${PV} /opt/$(get_libdir)/${PN}.so.${PV:0:1}
  22. dosym ${PN}.so.${PV:0:1} /opt/$(get_libdir)/${PN}.so
  23. insinto /usr/include
  24. doins ftd2xx.h WinTypes.h
  25. dodir /etc/env.d
  26. echo "LDPATH=\"/opt/$(get_libdir)\"" > ${D}/etc/env.d/50libftd2xx || die
  27. if use examples ; then
  28. find sample lib_table '(' -name '*.so' -o -name '*.[oa]' ')' -exec rm -f {} +
  29. insinto /usr/share/doc/${PF}
  30. doins -r sample
  31. insinto /usr/share/doc/${PF}/sample
  32. doins -r lib_table
  33. fi
  34. dodoc Config.txt
  35. use x86 && dodoc faq.txt readme.dat
  36. use amd64 && dodoc FAQ.txt README.dat
  37. }