# Copyright 1999-2013 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ EAPI=5 DESCRIPTION="LeapMotion SDK + Runtime" HOMEPAGE="http://www.leapmotion.com/" MY_PYP_N=${PV/_p/.} MY_PVP=${PV/_p/_} MY_PV=${PV%_p*} SRC_URI="DeveloperSdk_LM_${PV}_Linux.tar.gz" inherit eutils unpacker multilib S="${WORKDIR}/Leap_Developer_Kit_${MY_PVP}_Linux" LICENSE="LeapMotionSDK" SLOT="0" KEYWORDS="-* ~amd64 ~x86" RESTRICT="fetch" QA_PREBUILT="*" pkg_nofetch() { einfo "!!! Please visit https://developer.leapmotion.com/ and download the linux package." einfo "!!! After downloading the package with version ${MY_PVP_N} move it to \"${DISTDIR}/${SRC_URI}\"" } src_install() { unpack_deb "Leap-${MY_PV}-$(usex amd64 x64 x86).deb" insinto /opt/Leap doins -r usr lib LeapSDK local libdir=$(get_libdir) cd usr/bin local i for i in *; do make_wrapper "$i" "/opt/Leap/usr/bin/$i" . "/opt/Leap/lib:/opt/Leap/usr/lib/Leap" fperms +x "/opt/Leap/usr/bin/$i" done dosym /opt/Leap/LeapSDK/include /usr/include/Leap dosym /opt/Leap/LeapSDK/lib/x64 "/usr/${libdir}/Leap" if use amd64; then dosym /opt/Leap/LeapSDK/lib/x86 "/usr/$(ABI=x86 get_libdir)/Leap" fi }