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.

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