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.

73 lines
1.8 KiB

  1. # Copyright (C) 2020 Stijn Tintel <stijn@linux-ipv6.be>
  2. #
  3. # This is free software, licensed under the GNU General Public License v2.
  4. # See /LICENSE for more information.
  5. include $(TOPDIR)/rules.mk
  6. PKG_NAME:=readsb
  7. PKG_VERSION:=3.8.3
  8. PKG_RELEASE:=2
  9. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  10. PKG_SOURCE_URL:=https://codeload.github.com/Mictronics/readsb/tar.gz/v$(PKG_VERSION)?
  11. PKG_HASH:=bf59b8ecd0ff66945b210c55a5b824aa63ff8cbb1704249528d30a4902e716b2
  12. PKG_LICENSE:=GPL-3.0-or-later
  13. PKG_LICENSE_FILES:=COPYING LICENSE
  14. PKG_MAINTAINER:=Stijn Tintel <stijn@linux-ipv6.be>
  15. PKG_BUILD_DEPENDS:=!USE_GLIBC:argp-standalone
  16. PKG_BUILD_PARALLEL:=1
  17. include $(INCLUDE_DIR)/package.mk
  18. define Package/readsb/default
  19. SECTION:=utils
  20. CATEGORY:=Utilities
  21. DEPENDS:=+libncurses
  22. TITLE:=Mode-S/ADSB/TIS decoder for various devices
  23. URL:=https://github.com/Mictronic/readsb
  24. endef
  25. define Package/readsb
  26. $(call Package/readsb/default)
  27. TITLE+= (readsb)
  28. DEPENDS+=+librtlsdr
  29. endef
  30. define Package/viewadsb
  31. $(call Package/readsb/default)
  32. TITLE+= (viewadsb)
  33. endef
  34. MAKE_FLAGS += \
  35. BLADERF=no \
  36. CFLAGS="$(TARGET_CFLAGS)" \
  37. RTLSDR=yes \
  38. UNAME="Linux"
  39. TARGET_CFLAGS += -ffunction-sections -fdata-sections -flto
  40. TARGET_LDFLAGS += \
  41. $(if $(CONFIG_LIBC_USE_GLIBC),,-largp) \
  42. -Wl,--gc-sections,--as-needed
  43. define Package/readsb/conffiles
  44. /etc/config/readsb
  45. endef
  46. define Package/readsb/install
  47. $(INSTALL_DIR) $(1)/etc/{config,init.d} $(1)/usr/bin
  48. $(INSTALL_CONF) ./files/readsb.config $(1)/etc/config/readsb
  49. $(INSTALL_BIN) ./files/readsb.init $(1)/etc/init.d/readsb
  50. $(INSTALL_BIN) $(PKG_BUILD_DIR)/readsb $(1)/usr/bin
  51. endef
  52. define Package/viewadsb/install
  53. $(INSTALL_DIR) $(1)/usr/bin
  54. $(INSTALL_BIN) $(PKG_BUILD_DIR)/viewadsb $(1)/usr/bin
  55. endef
  56. $(eval $(call BuildPackage,readsb))
  57. $(eval $(call BuildPackage,viewadsb))