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