phidget21: add missing dependency
[openwrt/svn-archive/archive.git] / libs / protobuf / Makefile
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.4.1
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:=ed436802019c9e1f40cc750eaf78f318
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
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 CONFIGURE_ARGS += --with-protoc=$(STAGING_DIR_HOST)/bin/protoc
41
42 define Build/InstallDev
43 $(INSTALL_DIR) \
44 $(1)/usr/lib \
45 $(1)/usr/include
46
47 $(CP) \
48 $(PKG_INSTALL_DIR)/usr/include/* \
49 $(1)/usr/include/
50
51 $(CP) \
52 $(PKG_INSTALL_DIR)/usr/lib/* \
53 $(1)/usr/lib/
54 endef
55
56 define Package/protobuf/install
57 $(INSTALL_DIR) \
58 $(1)/usr/lib
59
60 $(CP) \
61 $(PKG_INSTALL_DIR)/usr/lib/libprotoc.so* \
62 $(1)/usr/lib/
63
64 $(CP) \
65 $(PKG_INSTALL_DIR)/usr/lib/libprotobuf-lite.so* \
66 $(1)/usr/lib/
67
68 $(CP) \
69 $(PKG_INSTALL_DIR)/usr/lib/libprotobuf.so* \
70 $(1)/usr/lib/
71 endef
72
73 $(eval $(call BuildPackage,protobuf))
74 $(eval $(call HostBuild))