Merge pull request #19372 from cotequeiroz/libgd
[feed/packages.git] / libs / libmodbus / Makefile
1 #
2 # Copyright (C) 2006-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
8 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=libmodbus
11 PKG_VERSION:=3.1.8
12 PKG_RELEASE:=1
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15 PKG_SOURCE_URL:=https://github.com/stephane/libmodbus/releases/download/v$(PKG_VERSION)/
16 PKG_HASH:=b122f2bc29f749702a22c0a760a7ca2182d541f5fa26bf25e3431f907b606f3c
17
18 PKG_MAINTAINER:=Michael Heimpold <mhei@heimpold.de>
19
20 PKG_LICENSE:=LGPL-2.1-or-later
21 PKG_LICENSE_FILES:=COPYING.LESSER
22
23 PKG_FIXUP:=autoreconf
24 PKG_INSTALL:=1
25
26 include $(INCLUDE_DIR)/package.mk
27
28 define Package/libmodbus
29 SECTION:=libs
30 CATEGORY:=Libraries
31 URL:=http://www.libmodbus.org
32 TITLE:=libmodbus
33 endef
34
35 define Package/libmodbus/description
36 A Modbus library for Linux, Mac OS X, FreeBSD, QNX and Win32.
37 endef
38
39 CONFIGURE_ARGS += --disable-tests
40 TARGET_CFLAGS += $(FPIC)
41
42 define Build/InstallDev
43 $(INSTALL_DIR) $(1)/usr/include
44 $(CP) $(PKG_INSTALL_DIR)/usr/include/modbus $(1)/usr/include/
45 $(INSTALL_DIR) $(1)/usr/lib
46 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libmodbus.{so*,la} $(1)/usr/lib/
47 $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
48 $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libmodbus.pc $(1)/usr/lib/pkgconfig/
49 endef
50
51 define Package/libmodbus/install
52 $(INSTALL_DIR) $(1)/usr/lib
53 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libmodbus.so.* $(1)/usr/lib/
54 endef
55
56 $(eval $(call BuildPackage,libmodbus))