Browse Source

Add libmodbus library

I used the current version found in package feed, upgraded to the latest
stable upstream version, fixed the download url and added me as maintainer.

Signed-off-by: Michael Heimpold <mhei@heimpold.de>
Michael Heimpold 10 years ago
parent
commit
525d7cda36
1 changed files with 51 additions and 0 deletions
  1. 51
    0
      libs/libmodbus/Makefile

+ 51
- 0
libs/libmodbus/Makefile View File

@@ -0,0 +1,51 @@
1
+#
2
+# Copyright (C) 2006-2014 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.0.6
12
+PKG_RELEASE:=1
13
+
14
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15
+PKG_SOURCE_URL:=http://libmodbus.org/releases
16
+PKG_MD5SUM:=c80f88b6ca19cabc4ceffc195ca07771
17
+
18
+PKG_FIXUP:=autoreconf
19
+PKG_INSTALL:=1
20
+
21
+include $(INCLUDE_DIR)/package.mk
22
+
23
+define Package/libmodbus
24
+  SECTION:=libs
25
+  CATEGORY:=Libraries
26
+  URL:=http://www.libmodbus.org
27
+  TITLE:=libmodbus
28
+  MAINTAINER:=Michael Heimpold <mhei@heimpold.de>
29
+endef
30
+
31
+define Package/libmodbus/description
32
+A Modbus library for Linux, Mac OS X, FreeBSD, QNX and Win32
33
+endef
34
+
35
+TARGET_CFLAGS += $(FPIC)
36
+
37
+define Build/InstallDev
38
+	$(INSTALL_DIR) $(1)/usr/include
39
+	$(CP) $(PKG_INSTALL_DIR)/usr/include/modbus $(1)/usr/include/
40
+	$(INSTALL_DIR) $(1)/usr/lib
41
+	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libmodbus.{so*,la} $(1)/usr/lib/
42
+	$(INSTALL_DIR) $(1)/usr/lib/pkgconfig
43
+	$(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libmodbus.pc $(1)/usr/lib/pkgconfig/
44
+endef
45
+
46
+define Package/libmodbus/install
47
+	$(INSTALL_DIR) $(1)/usr/lib
48
+	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libmodbus.so* $(1)/usr/lib/
49
+endef
50
+
51
+$(eval $(call BuildPackage,libmodbus))