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.

100 lines
2.3 KiB

  1. #
  2. # Copyright (C) 2014-2016 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:=hamlib
  8. PKG_VERSION:=3.0.1
  9. PKG_RELEASE:=1
  10. PKG_MD5SUM:=451acb9f727ed706ae2f59ee3f0e03c7
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  12. PKG_SOURCE_URL:=@SF/hamlib
  13. PKG_FIXUP:=autoreconf
  14. PKG_INSTALL:=1
  15. PKG_LICENSE:=GPLv2
  16. PKG_LICENSE_FILES:=COPYING
  17. PKG_MAINTAINER:=Vasilis Tsiligiannis <acinonyx@openwrt.gr>
  18. include $(INCLUDE_DIR)/package.mk
  19. define Package/hamlib/Default
  20. TITLE:=Ham Radio Control
  21. URL:=http://hamlib.sourceforge.net
  22. endef
  23. define Package/hamlib/Default/description
  24. Ham Radio Control Libraries is a development effort to provide a consistent
  25. interface for programmers wanting to incorporate radio control in their
  26. programs.
  27. endef
  28. define Package/hamlib
  29. $(call Package/hamlib/Default)
  30. TITLE+= utilities
  31. SECTION:=utils
  32. CATEGORY:=Utilities
  33. DEPENDS:=+libhamlib
  34. endef
  35. define Package/hamlib/description
  36. $(call Package/hamlib/Default/description)
  37. This package contains the utilities and daemons.
  38. endef
  39. define Package/libhamlib/Default
  40. $(call Package/hamlib/Default)
  41. SECTION:=libs
  42. CATEGORY:=Libraries
  43. TITLE+= shared library
  44. endef
  45. define Package/libhamlib
  46. $(call Package/libhamlib/Default)
  47. DEPENDS:=+libusb-1.0
  48. MENU:=1
  49. endef
  50. define Package/libhamlib/description
  51. $(call Package/hamlib/Default/description)
  52. This package contains the hamlib shared library.
  53. endef
  54. define Build/InstallDev
  55. $(INSTALL_DIR) $(1)/usr/include/hamlib
  56. $(CP) $(PKG_INSTALL_DIR)/usr/include/hamlib/*.h $(1)/usr/include/hamlib
  57. $(INSTALL_DIR) $(1)/usr/lib
  58. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libhamlib.so* $(1)/usr/lib/
  59. $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
  60. $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/hamlib.pc $(1)/usr/lib/pkgconfig/
  61. endef
  62. CONFIGURE_ARGS+= \
  63. --disable-html-matrix \
  64. --disable-winradio \
  65. --without-readline \
  66. --without-cxx-binding \
  67. --with-pic \
  68. CONFIGURE_VARS+= \
  69. LIBUSB_LIBS="-lusb-1.0" \
  70. define Package/hamlib/install
  71. $(INSTALL_DIR) $(1)/usr/bin
  72. $(CP) $(PKG_INSTALL_DIR)/usr/bin/{rig,rot}* $(1)/usr/bin/
  73. endef
  74. define Package/libhamlib/install
  75. $(INSTALL_DIR) $(1)/usr/lib
  76. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libhamlib.so* $(1)/usr/lib/
  77. endef
  78. $(eval $(call BuildPackage,hamlib))
  79. $(eval $(call BuildPackage,libhamlib))