spectools-2011.08.1_p20140618-r1.ebuild 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. # Copyright 1999-2015 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=5
  4. inherit autotools eutils flag-o-matic 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="https://dev.gentoo.org/~zerochaos/distfiles/${MY_P}.tar.xz"
  16. KEYWORDS="~amd64 ~arm ~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. DEPEND="${RDEPEND}
  28. virtual/pkgconfig"
  29. # Upstream has still not migrated to the libusb-1 line.
  30. # Maemo: Add hildon and bbus
  31. src_prepare() {
  32. epatch "${FILESDIR}"/${P}-tinfo.patch
  33. mv configure.{in,ac} || die
  34. eautoreconf
  35. }
  36. src_configure() {
  37. append-cflags -std=gnu89
  38. default
  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. }