net-wireless/ubertooth: bump, cleanup
authorZero_Chaos <zerochaos@gentoo.org>
Sat, 4 Mar 2017 05:05:14 +0000 (00:05 -0500)
committerZero_Chaos <zerochaos@gentoo.org>
Sat, 4 Mar 2017 05:06:14 +0000 (00:06 -0500)
Package-Manager: Portage-2.3.3, Repoman-2.3.1

net-wireless/ubertooth/Manifest
net-wireless/ubertooth/ubertooth-2017.03.1.ebuild [new file with mode: 0644]
net-wireless/ubertooth/ubertooth-9999.ebuild

index 7fccdf3cd35c7ed9e3fabfab91f937a2f1489cc2..c196aca8dd4da56289122aa708d4815ce43fb84f 100644 (file)
@@ -1 +1,2 @@
 DIST ubertooth-2015-10-R1.tar.xz 1716840 SHA256 bc37e7978d137a64d918d7c8f1e7ca9cff093f9921d805e9809b12e5ab12ae35 SHA512 ad7229c9509db4b4230ec28d1c16200f0780dd7ce55224528ced6d8969f342a79b7317b69e7b9e49d03e93f973203801f4f703dd80dc115400366b0984c965b1 WHIRLPOOL 5f46bdc8746481d68fd5c8e3ce04aadbcc1bc704c95b1b5a3d389376704a2a3e702faf819c749f98cb737578e9ccfa3ac01887081bceeceed2e4804493b2c2a8
+DIST ubertooth-2017-03-R1.tar.xz 671196 SHA256 76ace37e3920c0216b13aa7c0a4c094864262f1054f5ac406beafde954a37726 SHA512 546cc84b2c322e48c7a9da5c507b213d7fe6e8c1fefde0404f9bbc1f24675ace7fc831f941f362eca2cf3abefe1d9ba51cb12dd8b7407a59b7560fba8864b268 WHIRLPOOL e8229d522de78fb752a3ada37083753ea413b92426907cabc50575b48a00b445c25a7a78447b24196840cb655961d1ff4cb5c3e4462ff2893f31848fe15c102f
diff --git a/net-wireless/ubertooth/ubertooth-2017.03.1.ebuild b/net-wireless/ubertooth/ubertooth-2017.03.1.ebuild
new file mode 100644 (file)
index 0000000..de2e949
--- /dev/null
@@ -0,0 +1,102 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+
+PYTHON_COMPAT=( python2_7 )
+DISTUTILS_OPTIONAL=1
+
+inherit multilib distutils-r1 cmake-utils udev
+
+HOMEPAGE="http://ubertooth.sourceforge.net/"
+
+LICENSE="GPL-2"
+SLOT="0"
+IUSE="+bluez +specan static-libs +ubertooth1-firmware +udev"
+REQUIRED_USE="specan? ( ${PYTHON_REQUIRED_USE} )"
+DEPEND="bluez? ( net-wireless/bluez:= )
+       >=net-libs/libbtbb-${PV}:=[static-libs?]
+       specan? ( ${PYTHON_DEPS} )
+       static-libs? ( dev-libs/libusb[static-libs] )
+       virtual/libusb:1="
+RDEPEND="${DEPEND}
+       specan? ( >=dev-qt/qtgui-4.7.2:4
+               >=dev-python/pyside-1.0.2[${PYTHON_USEDEP}]
+               >=dev-python/numpy-1.3[${PYTHON_USEDEP}] )
+       udev? ( virtual/udev )"
+
+MY_PV=${PV/\./-}
+MY_PV=${MY_PV/./-R}
+if [[ ${PV} == "9999" ]] ; then
+       EGIT_REPO_URI="https://github.com/greatscottgadgets/ubertooth.git"
+       inherit git-r3
+       KEYWORDS=""
+       S="${WORKDIR}/${P}/host"
+else
+       S="${WORKDIR}/${PN}-${MY_PV}/host"
+       SRC_URI="https://github.com/greatscottgadgets/${PN}/releases/download/${MY_PV}/${PN}-${MY_PV}.tar.xz"
+       KEYWORDS="~amd64 ~arm ~x86"
+fi
+DESCRIPTION="open source wireless development platform suitable for Bluetooth experimentation"
+
+#readd firmware building, but do it right
+#USE="-fortran -mudflap -nls -openmp -multilib" crossdev --without-headers --genv 'EXTRA_ECONF="--with-mode=thumb --with-cpu=cortex-m3 --with-float=soft"' -s4 -t arm-cortexm3-eabi
+
+src_prepare() {
+       cmake-utils_src_prepare
+       if use specan; then
+               pushd python/specan_ui || die
+               distutils-r1_src_prepare
+               popd
+       fi
+}
+
+src_configure() {
+       mycmakeargs=(
+               -DUSE_BLUEZ=$(usex bluez)
+               -DBUILD_STATIC_LIB=$(usex static-libs)
+               -DINSTALL_UDEV_RULES=$(usex udev)
+               -DENABLE_PYTHON=false
+       )
+       if use udev; then
+               mycmakeargs+=(
+                       -DUDEV_RULES_GROUP=usb
+                       -DUDEV_RULES_PATH="$(get_udevdir)/rules.d"
+               )
+       fi
+       cmake-utils_src_configure
+}
+
+src_compile() {
+       cmake-utils_src_compile
+
+       if use specan; then
+               pushd python/specan_ui || die
+               distutils-r1_src_compile
+               popd
+       fi
+}
+
+src_install() {
+       cmake-utils_src_install
+
+       insinto /usr/share/${PN}
+       pushd "${WORKDIR}/${PN}-${MY_PV}" || die
+       if [[ ${PV} == "9999" ]] ; then
+               ewarn "Firmware isn't available for git releases, we assume you are already"
+               ewarn "on the latest and/or can build your own."
+       else
+               use ubertooth1-firmware && newins ubertooth-one-firmware-bin/bluetooth_rxtx.dfu ${PN}-one-${PV}-bluetooth_rxtx.dfu
+               use ubertooth1-firmware && newins ubertooth-one-firmware-bin/bluetooth_rx_only.dfu ${PN}-one-${PV}-bluetooth_rx_only.dfu
+       fi
+       popd
+
+       if use specan; then
+               pushd python/specan_ui || die
+               distutils-r1_src_install
+               popd
+       fi
+
+       elog "Everyone can read from the ubertooth, but to talk to it"
+       elog "your user needs to be in the usb group."
+}
index d3c2d36233050a66e5b2c7cc5616aa4e8850f73a..de2e949b8cb624b0e016059cae99178b5a5e2df9 100644 (file)
@@ -1,7 +1,7 @@
-# Copyright 1999-2016 Gentoo Foundation
+# Copyright 1999-2017 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
-EAPI="5"
+EAPI="6"
 
 PYTHON_COMPAT=( python2_7 )
 DISTUTILS_OPTIONAL=1
@@ -12,11 +12,10 @@ HOMEPAGE="http://ubertooth.sourceforge.net/"
 
 LICENSE="GPL-2"
 SLOT="0"
-IUSE="+bluez +specan static-libs +pcap +ubertooth1-firmware +udev"
+IUSE="+bluez +specan static-libs +ubertooth1-firmware +udev"
 REQUIRED_USE="specan? ( ${PYTHON_REQUIRED_USE} )"
 DEPEND="bluez? ( net-wireless/bluez:= )
        >=net-libs/libbtbb-${PV}:=[static-libs?]
-       pcap? ( net-libs/libbtbb[pcap] )
        specan? ( ${PYTHON_DEPS} )
        static-libs? ( dev-libs/libusb[static-libs] )
        virtual/libusb:1="
@@ -54,10 +53,9 @@ src_prepare() {
 
 src_configure() {
        mycmakeargs=(
-               $(cmake-utils_use_enable bluez USE_BLUEZ)
-               $(cmake-utils_use pcap USE_PCAP)
-               $(cmake-utils_use static-libs BUILD_STATIC_LIB)
-               $(cmake-utils_use_enable udev INSTALL_UDEV_RULES)
+               -DUSE_BLUEZ=$(usex bluez)
+               -DBUILD_STATIC_LIB=$(usex static-libs)
+               -DINSTALL_UDEV_RULES=$(usex udev)
                -DENABLE_PYTHON=false
        )
        if use udev; then