spectools-9999.ebuild 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. # Copyright 1999-2016 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=5
  4. inherit autotools eutils toolchain-funcs udev
  5. MY_PN=${PN}
  6. MY_PV=${PV/\./-}
  7. MY_PV=${MY_PV/./-R}
  8. MY_P="${MY_PN}-${MY_PV}"
  9. S=${WORKDIR}/${MY_P}
  10. if [[ ${PV} == "9999" ]] ; then
  11. EGIT_REPO_URI="https://www.kismetwireless.net/${PN}.git"
  12. inherit git-r3
  13. KEYWORDS=""
  14. else
  15. SRC_URI="http://www.kismetwireless.net/code/${MY_P}.tar.xz"
  16. KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~x86"
  17. fi
  18. DESCRIPTION="Spectrum Analyzer for Meta-Geek Wi-Spy and GSG Ubertooth hardware"
  19. HOMEPAGE="http://www.kismetwireless.net/spectools/"
  20. LICENSE="GPL-2"
  21. SLOT="0"
  22. IUSE="debug +ncurses +gtk"
  23. RDEPEND="
  24. virtual/libusb:0
  25. ncurses? ( sys-libs/ncurses:0= )
  26. gtk? ( x11-libs/gtk+:2
  27. x11-libs/cairo
  28. x11-libs/gdk-pixbuf
  29. x11-libs/pango
  30. dev-libs/glib:= )"
  31. DEPEND="${RDEPEND}
  32. virtual/pkgconfig"
  33. # Upstream has still not migrated to the libusb-1 line.
  34. # Maemo: Add hildon and bbus
  35. src_prepare() {
  36. epatch "${FILESDIR}"/${PN}-2011.08.1_p20140618-tinfo.patch
  37. mv configure.{in,ac} || die
  38. eautoreconf
  39. }
  40. # Please note that upstream removed the --with-gtk-version option
  41. # and GTK is now automagical. GTK1 support was also removed.
  42. src_compile() {
  43. emake depend
  44. emake spectool_net
  45. use debug && emake spectool_raw
  46. use ncurses && emake spectool_curses
  47. use gtk && emake spectool_gtk
  48. #if use maemo; then
  49. # emake spectool_hildon usbcontrol \
  50. # || die "emake spectool_hildon usbcontrol failed"
  51. #fi
  52. }
  53. src_install() {
  54. dobin spectool_net
  55. use debug && dobin spectool_raw
  56. use ncurses && dobin spectool_curses
  57. use gtk && dobin spectool_gtk
  58. udev_dorules 99-wispy.rules
  59. dodoc README
  60. #if use maemo; then
  61. # dobin spectool_hildon
  62. # dosbin usbcontrol
  63. #fi
  64. }