|
@@ -0,0 +1,81 @@
|
|
1
|
+#
|
|
2
|
+# Copyright (C) 2007 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:=protobuf
|
|
11
|
+PKG_VERSION:=2.5.0
|
|
12
|
+PKG_RELEASE:=1
|
|
13
|
+
|
|
14
|
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
|
|
15
|
+PKG_SOURCE_URL:=http://protobuf.googlecode.com/files
|
|
16
|
+PKG_MD5SUM:=a72001a9067a4c2c4e0e836d0f92ece4
|
|
17
|
+
|
|
18
|
+PKG_BUILD_DEPENDS:=protobuf/host
|
|
19
|
+
|
|
20
|
+PKG_INSTALL:=1
|
|
21
|
+
|
|
22
|
+include $(INCLUDE_DIR)/package.mk
|
|
23
|
+include $(INCLUDE_DIR)/host-build.mk
|
|
24
|
+
|
|
25
|
+define Package/protobuf
|
|
26
|
+ SECTION:=libs
|
|
27
|
+ CATEGORY:=Libraries
|
|
28
|
+ TITLE:=A structured data encoding library
|
|
29
|
+ URL:=http://code.google.com/p/protobuf/
|
|
30
|
+ DEPENDS:=+zlib +libpthread +libstdcpp
|
|
31
|
+ MAINTAINER:=Obinou <obconseil@gmail.com>
|
|
32
|
+endef
|
|
33
|
+
|
|
34
|
+define Package/protobuf/description
|
|
35
|
+ Protocol Buffers are a way of encoding structured data in an efficient
|
|
36
|
+ yet extensible format. Google uses Protocol Buffers for almost all
|
|
37
|
+ of its internal RPC protocols and file formats.
|
|
38
|
+endef
|
|
39
|
+
|
|
40
|
+define Host/Compile
|
|
41
|
+ $(MAKE) -C $(HOST_BUILD_DIR)
|
|
42
|
+endef
|
|
43
|
+
|
|
44
|
+define Host/Install
|
|
45
|
+endef
|
|
46
|
+
|
|
47
|
+CONFIGURE_ARGS += --with-protoc=$(HOST_BUILD_DIR)/src/protoc
|
|
48
|
+
|
|
49
|
+define Build/InstallDev
|
|
50
|
+ $(INSTALL_DIR) \
|
|
51
|
+ $(1)/usr/lib \
|
|
52
|
+ $(1)/usr/include
|
|
53
|
+
|
|
54
|
+ $(CP) \
|
|
55
|
+ $(PKG_INSTALL_DIR)/usr/include/* \
|
|
56
|
+ $(1)/usr/include/
|
|
57
|
+
|
|
58
|
+ $(CP) \
|
|
59
|
+ $(PKG_INSTALL_DIR)/usr/lib/* \
|
|
60
|
+ $(1)/usr/lib/
|
|
61
|
+endef
|
|
62
|
+
|
|
63
|
+define Package/protobuf/install
|
|
64
|
+ $(INSTALL_DIR) \
|
|
65
|
+ $(1)/usr/lib
|
|
66
|
+
|
|
67
|
+ $(CP) \
|
|
68
|
+ $(PKG_INSTALL_DIR)/usr/lib/libprotoc.so* \
|
|
69
|
+ $(1)/usr/lib/
|
|
70
|
+
|
|
71
|
+ $(CP) \
|
|
72
|
+ $(PKG_INSTALL_DIR)/usr/lib/libprotobuf-lite.so* \
|
|
73
|
+ $(1)/usr/lib/
|
|
74
|
+
|
|
75
|
+ $(CP) \
|
|
76
|
+ $(PKG_INSTALL_DIR)/usr/lib/libprotobuf.so* \
|
|
77
|
+ $(1)/usr/lib/
|
|
78
|
+endef
|
|
79
|
+
|
|
80
|
+$(eval $(call BuildPackage,protobuf))
|
|
81
|
+$(eval $(call HostBuild))
|