You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

88 lines
2.2 KiB

  1. #
  2. # Copyright (C) 2013 OpenWrt.org
  3. #
  4. # This is free software, licensed under the GNU General Public License v2.
  5. # See /LICENSE for more information.
  6. include $(TOPDIR)/rules.mk
  7. PKG_NAME:=rtl-sdr
  8. PKG_VERSION:=2013-06-12
  9. PKG_RELEASE:=$(PKG_SOURCE_VERSION)
  10. PKG_SOURCE_PROTO:=git
  11. PKG_SOURCE_URL:=git://git.osmocom.org/rtl-sdr.git
  12. PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
  13. PKG_SOURCE_VERSION:=8c3a99c8f7a88d7d2a05845d4b20cfcdacac4054
  14. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
  15. CMAKE_INSTALL:=1
  16. PKG_LICENSE:=GPLv2
  17. PKG_LICENSE_FILES:=COPYING
  18. PKG_MAINTAINER:=Vasilis Tsiligiannis <b_tsiligiannis@silverton.gr>
  19. include $(INCLUDE_DIR)/package.mk
  20. include $(INCLUDE_DIR)/cmake.mk
  21. define Package/rtl-sdr/Default
  22. TITLE:=Software Defined Radio with Realtek RTL2832U
  23. URL:=http://sdr.osmocom.org/trac/wiki/rtl-sdr
  24. endef
  25. define Package/rtl-sdr/Default/description
  26. rtl-sdr allows DVB-T dongles based on the Realtek RTL2832U to be used as
  27. an inexpensive SDR.
  28. endef
  29. define Package/rtl-sdr
  30. $(call Package/rtl-sdr/Default)
  31. SECTION:=utils
  32. CATEGORY:=Utilities
  33. DEPENDS:=+librt +libpthread +librtlsdr
  34. endef
  35. define Package/rtl-sdr/description
  36. $(call Package/rtl-sdr/Default/description)
  37. This package contains the utilities and daemons.
  38. endef
  39. define Package/librtlsdr
  40. $(call Package/rtl-sdr/Default)
  41. TITLE+= shared library
  42. SECTION:=libs
  43. CATEGORY:=Libraries
  44. TITLE+= library
  45. DEPENDS:=+libusb-1.0
  46. endef
  47. define Package/librtlsdr/description
  48. $(call Package/rtl-sdr/Default/description)
  49. This package contains the librtlsdr shared library.
  50. endef
  51. TARGET_CFLAGS += $(FPIC)
  52. define Build/InstallDev
  53. $(INSTALL_DIR) $(1)/usr/include
  54. $(CP) $(PKG_INSTALL_DIR)/usr/include/*.h $(1)/usr/include/
  55. $(INSTALL_DIR) $(1)/usr/lib
  56. $(CP) $(PKG_INSTALL_DIR)/usr/lib/librtlsdr.so* $(1)/usr/lib/
  57. $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
  58. $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/librtlsdr.pc $(1)/usr/lib/pkgconfig/
  59. endef
  60. define Package/rtl-sdr/install
  61. $(INSTALL_DIR) $(1)/usr/bin
  62. $(CP) $(PKG_INSTALL_DIR)/usr/bin/rtl_* $(1)/usr/bin/
  63. endef
  64. define Package/librtlsdr/install
  65. $(INSTALL_DIR) $(1)/usr/lib
  66. $(CP) $(PKG_INSTALL_DIR)/usr/lib/librtlsdr.so* $(1)/usr/lib/
  67. endef
  68. $(eval $(call BuildPackage,rtl-sdr))
  69. $(eval $(call BuildPackage,librtlsdr))