Ver código fonte

Merge pull request #92 from jsiverskog/master

protobuf-c: import from packages, bump version.
sbyx 10 anos atrás
pai
commit
831d0c17d7
1 arquivos alterados com 64 adições e 0 exclusões
  1. 64
    0
      libs/protobuf-c/Makefile

+ 64
- 0
libs/protobuf-c/Makefile Ver arquivo

@@ -0,0 +1,64 @@
1
+#
2
+# Copyright (C) 2011 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:=libprotobuf-c
11
+PKG_VERSION:=2014-06-30
12
+PKG_RELEASE:=$(PKG_SOURCE_VERSION)
13
+
14
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
15
+PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
16
+PKG_SOURCE_URL:=git://github.com/protobuf-c/protobuf-c.git
17
+PKG_SOURCE_PROTO:=git
18
+PKG_SOURCE_VERSION:=6136f54b221ab8883731349d01f34b01812e391d
19
+
20
+PKG_INSTALL:=1
21
+
22
+PKG_MAINTAINER:=Jacob Siverskog <jacob@teenageengineering.com>
23
+
24
+include $(INCLUDE_DIR)/package.mk
25
+
26
+define Package/libprotobuf-c
27
+  TITLE:=Protocol Buffers library
28
+  SECTION:=libs
29
+  CATEGORY:=Libraries
30
+  URL:=http://code.google.com/p/protobuf-c/
31
+endef
32
+
33
+define Package/libprotobuf-c/description
34
+  Runtime library to use Google Protocol Buffers from C applications.
35
+  Protocol Buffers are a way of encoding structured data in an efficient yet
36
+  extensible format. Google uses Protocol Buffers for almost all of its
37
+  internal RPC protocols and file formats.
38
+endef
39
+
40
+CONFIGURE_ARGS += \
41
+	--enable-shared \
42
+	--enable-static \
43
+	--disable-protoc
44
+
45
+define Build/Configure
46
+	cd $(PKG_BUILD_DIR) && ./autogen.sh
47
+	$(call Build/Configure/Default)
48
+endef
49
+
50
+define Build/InstallDev
51
+	$(INSTALL_DIR) $(1)/usr/include/
52
+	$(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/
53
+	$(INSTALL_DIR) $(1)/usr/lib
54
+	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libprotobuf-c.{a,la,so*} $(1)/usr/lib/
55
+	$(INSTALL_DIR) $(1)/usr/lib/pkgconfig
56
+	$(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/* $(1)/usr/lib/pkgconfig/
57
+endef
58
+
59
+define Package/libprotobuf-c/install
60
+	$(INSTALL_DIR) $(1)/usr/lib
61
+	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libprotobuf-c.so.* $(1)/usr/lib/
62
+endef
63
+
64
+$(eval $(call BuildPackage,libprotobuf-c))