rtl-sdr-0.5.0.ebuild 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. # Copyright 1999-2013 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=5
  4. inherit autotools
  5. DESCRIPTION="turns your Realtek RTL2832 based DVB dongle into a SDR receiver"
  6. HOMEPAGE="http://sdr.osmocom.org/trac/wiki/rtl-sdr"
  7. if [[ ${PV} == 9999* ]]; then
  8. inherit git-2
  9. SRC_URI=""
  10. EGIT_REPO_URI="git://git.osmocom.org/${PN}.git"
  11. KEYWORDS=""
  12. else
  13. SRC_URI="https://dev.gentoo.org/~zerochaos/distfiles/${P}.tar.xz"
  14. KEYWORDS="~amd64 ~arm ~x86"
  15. fi
  16. LICENSE="GPL-2"
  17. SLOT="0"
  18. IUSE=""
  19. RDEPEND="virtual/libusb:1"
  20. DEPEND="${RDEPEND}"
  21. DOCS=( ${PN}.rules )
  22. src_unpack() {
  23. if [[ ${PV} == 9999* ]]; then
  24. git-2_src_unpack
  25. else
  26. default
  27. mv ${PN} ${P} || die
  28. fi
  29. }
  30. src_prepare() {
  31. eautoreconf
  32. }
  33. pkg_postinst() {
  34. local rulesfiles=( "${EPREFIX}"/etc/udev/rules.d/*${PN}.rules )
  35. if [[ ! -f ${rulesfiles} ]]; then
  36. elog "By default, only users in the usb group can capture."
  37. elog "Just run 'gpasswd -a <USER> usb', then have <USER> re-login."
  38. elog "Or the device can be WORLD readable and writable by installing ${PN}.rules"
  39. elog "from the documentation directory to ${EPREFIX}/etc/udev/rules.d/"
  40. fi
  41. }