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.

95 lines
2.4 KiB

  1. #
  2. # Copyright (C) 2015 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:=0.6.0
  9. PKG_RELEASE:=2
  10. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  11. PKG_SOURCE_URL:=https://git.osmocom.org/rtl-sdr/snapshot
  12. PKG_HASH:=ee10a76fe0c6601102367d4cdf5c26271e9442d0491aa8df27e5a9bf639cff7c
  13. CMAKE_INSTALL:=1
  14. PKG_LICENSE:=GPLv2
  15. PKG_LICENSE_FILES:=COPYING
  16. PKG_MAINTAINER:=Vasilis Tsiligiannis <b_tsiligiannis@silverton.gr>
  17. include $(INCLUDE_DIR)/package.mk
  18. include $(INCLUDE_DIR)/cmake.mk
  19. define Package/rtl-sdr/Default
  20. TITLE:=Software Defined Radio with Realtek RTL2832U
  21. URL:=http://sdr.osmocom.org/trac/wiki/rtl-sdr
  22. endef
  23. define Package/rtl-sdr/Default/description
  24. rtl-sdr allows DVB-T dongles based on the Realtek RTL2832U to be used as
  25. an inexpensive SDR.
  26. endef
  27. define Package/rtl-sdr
  28. $(call Package/rtl-sdr/Default)
  29. SECTION:=utils
  30. CATEGORY:=Utilities
  31. DEPENDS:=+librt +libpthread +librtlsdr
  32. endef
  33. define Package/rtl-sdr/description
  34. $(call Package/rtl-sdr/Default/description)
  35. This package contains the utilities and daemons.
  36. endef
  37. define Package/librtlsdr
  38. $(call Package/rtl-sdr/Default)
  39. TITLE+= shared library
  40. SECTION:=libs
  41. CATEGORY:=Libraries
  42. TITLE+= library
  43. DEPENDS:=+libusb-1.0
  44. endef
  45. define Package/librtlsdr/description
  46. $(call Package/rtl-sdr/Default/description)
  47. This package contains the librtlsdr shared library.
  48. endef
  49. TARGET_CFLAGS += $(FPIC)
  50. define Build/InstallDev
  51. $(INSTALL_DIR) $(1)/usr/include
  52. $(CP) $(PKG_INSTALL_DIR)/usr/include/*.h $(1)/usr/include/
  53. $(INSTALL_DIR) $(1)/usr/lib
  54. $(CP) $(PKG_INSTALL_DIR)/usr/lib/librtlsdr.so* $(1)/usr/lib/
  55. $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
  56. $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/librtlsdr.pc $(1)/usr/lib/pkgconfig/
  57. endef
  58. define Package/rtl-sdr/conffiles
  59. /etc/config/rtl_tcp
  60. endef
  61. define Package/rtl-sdr/install
  62. $(INSTALL_DIR) $(1)/usr/bin
  63. $(CP) $(PKG_INSTALL_DIR)/usr/bin/rtl_* $(1)/usr/bin/
  64. $(INSTALL_DIR) $(1)/etc/init.d
  65. $(INSTALL_BIN) files/rtl_tcp.init $(1)/etc/init.d/rtl_tcp
  66. $(INSTALL_DIR) $(1)/etc/config
  67. $(INSTALL_CONF) files/rtl_tcp.config $(1)/etc/config/rtl_tcp
  68. endef
  69. define Package/librtlsdr/install
  70. $(INSTALL_DIR) $(1)/usr/lib
  71. $(CP) $(PKG_INSTALL_DIR)/usr/lib/librtlsdr.so* $(1)/usr/lib/
  72. endef
  73. $(eval $(call BuildPackage,rtl-sdr))
  74. $(eval $(call BuildPackage,librtlsdr))