packages: ipv6/tayga: move static mappings to 'firewall' config
[openwrt/svn-archive/archive.git] / libs / libmbus / Makefile
1 #
2 # Copyright (C) 2011-2012 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:=libmbus
11 PKG_VERSION:=0.7.0
12 PKG_RELEASE:=1
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15 PKG_SOURCE_URL:=http://www.freescada.com/public-dist/
16 PKG_MD5SUM:=2f1a7ba0ccd683e6708364a13310a6d1
17
18 PKG_FIXUP:=libtool
19 PKG_INSTALL:=1
20
21 include $(INCLUDE_DIR)/package.mk
22
23 define Package/libmbus/Default
24 SECTION:=utils
25 CATEGORY:=Utilities
26 URL:=http://www.freescada.com/libmbus/
27 TITLE:=mbus-tools
28 endef
29
30 define Package/libmbus/Default/description
31 libmbus is an open source M-bus (Meter-Bus) library.
32 The Meter-Bus is a standard for reading out meter data from
33 electricity meters, heat meters, gas meters, etc.
34 endef
35
36 define Package/libmbus
37 $(call Package/libmbus/Default)
38 SECTION:=libs
39 CATEGORY:=Libraries
40 TITLE:=libmbus
41 endef
42
43 define Package/libmbus/description
44 $(call Package/libmbus/Default/description)
45
46 This package contains the M-bus shared library, used by other programs.
47 endef
48
49 define Package/mbus-serial
50 $(call Package/libmbus/Default)
51 DEPENDS+=+libmbus
52 TITLE+= (serial)
53 endef
54
55 define Package/mbus-serial/description
56 $(call Package/libmbus/Default/description)
57
58 This package contains command line tools for scanning the M-bus
59 and retrieving data from meters which are connected through a
60 serial (e.g. RS232) interface.
61 endef
62
63 define Package/mbus-tcp
64 $(call Package/libmbus/Default)
65 DEPENDS+=+libmbus
66 TITLE+= (tcp)
67 endef
68
69 define Package/mbus-tcp/description
70 $(call Package/libmbus/Default/description)
71
72 This package contains command line tools for scanning the M-bus
73 and retrieving data from meters which are accessible through
74 M-bus gateways via TCP.
75 endef
76
77 TARGET_CFLAGS += $(FPIC)
78
79 define Build/InstallDev
80 $(INSTALL_DIR) $(1)/usr/include
81 $(CP) $(PKG_INSTALL_DIR)/usr/include/mbus $(1)/usr/include/
82 $(INSTALL_DIR) $(1)/usr/lib
83 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libmbus.{so*,la} $(1)/usr/lib/
84 $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
85 $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libmbus.pc $(1)/usr/lib/pkgconfig/
86 endef
87
88 define Package/libmbus/install
89 $(INSTALL_DIR) $(1)/usr/lib
90 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libmbus.so* $(1)/usr/lib/
91 endef
92
93 define Package/mbus-serial/install
94 $(INSTALL_DIR) $(1)/usr/bin
95 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/mbus-serial-* $(1)/usr/bin/
96 endef
97
98 define Package/mbus-tcp/install
99 $(INSTALL_DIR) $(1)/usr/bin
100 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/mbus-tcp-* $(1)/usr/bin/
101 endef
102
103 $(eval $(call BuildPackage,libmbus))
104 $(eval $(call BuildPackage,mbus-serial))
105 $(eval $(call BuildPackage,mbus-tcp))