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