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