libftd2xx-1.1.12-r1.ebuild 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. # Copyright 1999-2014 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="http://www.ftdichip.com/Drivers/D2XX/Linux/${MY_P}.tar.gz"
  9. LICENSE="FTDI LGPL-2.1+"
  10. SLOT="0"
  11. KEYWORDS="~amd64 ~arm ~x86"
  12. IUSE="examples"
  13. QA_PREBUILT="*"
  14. S=${WORKDIR}
  15. src_install() {
  16. use arm && cd "${S}"/release/build/arm926
  17. use amd64 && cd "${S}"/release/build/x86_64
  18. use x86 && cd "${S}"/release/build/i386
  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 "${S}"/release/ftd2xx.h "${S}"/release/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. insinto /usr/share/doc/${PF}/sample
  29. doins -r "${S}"/release/examples
  30. fi
  31. dodoc "${S}"/release/ReadMe.txt
  32. }