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.

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