Guest User

AUR Package - ubertooth - python3 port

a guest
Feb 15th, 2020
200
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. pkgname=ubertooth
  2. pkgver=2018.12.R1
  3. _pkgver=2018-12-R1
  4. pkgrel=3
  5. pkgdesc="Open source wireless development platform suitable for Bluetooth experimentation"
  6. url="https://github.com/greatscottgadgets/ubertooth/"
  7. arch=('x86_64' 'i686')
  8. license=('GPL')
  9. depends=('bluez-libs' 'libbtbb>=2018.12.R1' 'libusbx' 'libpcap' 'python-numpy' 'python-pyusb')
  10. optdepends=('qt5-declarative' 'python-pyside2')
  11. makedepends=('cmake')
  12. source=("https://github.com/greatscottgadgets/ubertooth/releases/download/${_pkgver}/ubertooth-${_pkgver}.tar.xz")
  13. sha256sums=('0042daa79db0f4148a0255cdf05aa57006e23ac36edf7024e9e99ccc4892867b')
  14.  
  15. build() {
  16.   cd "${srcdir}/${pkgname}-${_pkgver}/host/"
  17.   mkdir -p build
  18.   cd build
  19.   cmake -DENABLE_PYTHON=FALSE -DCMAKE_INSTALL_PREFIX=${pkgdir}/usr -DUDEV_RULES_PATH=${pkgdir}/etc/udev/rules.d -DINSTALL_UDEV_RULES=TRUE -DUDEV_RULES_GROUP=uucp ..
  20.   make
  21.   cd ../python/specan_ui
  22.   python setup.py build
  23. }
  24.  
  25. package() {
  26.   # Runtime
  27.   cd "${srcdir}/${pkgname}-${_pkgver}/host/build/"
  28.   make install
  29.  
  30.   # GUI
  31.   cd ../python/specan_ui
  32.   python setup.py install --root="${pkgdir}/" --optimize=1 --skip-build
  33.  
  34.   # Firmware
  35.   install -dm755 "${pkgdir}/usr/share/ubertooth"
  36.   cd "${srcdir}/ubertooth-${_pkgver}"
  37.   cp -r "ubertooth-one-firmware-bin" "${pkgdir}/usr/share/ubertooth/ubertooth-one-firmware-bin"
  38.   cp -r "firmware" "${pkgdir}/usr/share/ubertooth/firmware"
  39. }
RAW Paste Data