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