SHARE
TWEET

AUR PKGBUILD - libbbtbb - March 2019

a guest Mar 5th, 2019 58 in 228 days
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. pkgbase=libbtbb
  2. #pkgname=(libbtbb wireshark-plugin-libbtbb)
  3. pkgname=(libbtbb)
  4. pkgver=2018.12.R1
  5. _pkgver=2018-12-R1
  6. pkgrel=1
  7. pkgdesc='Bluetooth baseband decoding library'
  8. url='https://github.com/greatscottgadgets/libbtbb'
  9. arch=('x86_64' 'i686')
  10. license=('GPL2')
  11. makedepends=('cmake' 'wireshark-cli')
  12. depends=('python2')
  13. source=("https://github.com/greatscottgadgets/libbtbb/archive/${_pkgver}.tar.gz")
  14. sha256sums=('0eb2b72e1c1131538206f1e3176e2cf1048751fe7dc665eef1e7429d1f2e6225')
  15.  
  16. build() {
  17.   cd "${srcdir}/${pkgname}-${_pkgver}/"
  18.   sed -i -r -e "s#@CMAKE_INSTALL_PREFIX@#/usr#" lib/libbtbb.pc.in
  19.   mkdir -p build
  20.   cd build
  21.   cmake -DCMAKE_INSTALL_PREFIX=${pkgdir}/usr -DENABLE_PYTHON=FALSE ..
  22.   make
  23.   cd ../python/pcaptools
  24.   sed -i -r -e "s/python/python2/" btaptap
  25.   python2 setup.py build
  26.  
  27.   # Build wireshark plugins
  28.   cd "${srcdir}/${pkgname}-${_pkgver}/wireshark/plugins/btbb/"
  29.   mkdir build
  30.   cd build
  31.   cmake -DCMAKE_INSTALL_PREFIX=${pkgdir}/usr ..
  32.   make
  33.  
  34.   cd "${srcdir}/${pkgname}-${_pkgver}/wireshark/plugins/btbredr/"
  35.   mkdir build
  36.   cd build
  37.   cmake -DCMAKE_INSTALL_PREFIX=${pkgdir}/usr ..
  38.   make
  39. }
  40.  
  41. package_libbtbb() {
  42.   cd "${srcdir}/${pkgbase}-${_pkgver}/build/"
  43.   make install
  44.   cd ../python/pcaptools
  45.   mkdir -p ${pkgdir}/usr/bin
  46.   cp btaptap ${pkgdir}/usr/bin/
  47.   python2 setup.py install --root="${pkgdir}/" --optimize=1 --skip-build
  48. }
  49.  
  50. package_wireshark-plugin-libbtbb(){
  51.   pkgdesc+=' (Wireshark Plugins)'
  52.   depends=('wireshark-cli' 'libbtbb')
  53.   #DESTDIR="${pkgdir}/usr/lib/wireshark/plugins/2.6"  
  54.   cd "${srcdir}/${pkgbase}-${_pkgver}/wireshark/plugins/btbb/build"
  55.   install -Dm644 btbb.so ${pkgdir}/usr/lib/wireshark/plugins/2.6/epan/btbb.so
  56.   cd "${srcdir}/${pkgbase}-${_pkgver}/wireshark/plugins/btbredr/build"
  57.   install -Dm644 btbredr.so ${pkgdir}/usr/lib/wireshark/plugins/2.6/epan/btbredr.so
  58. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top