protobuf: add smaller protobuf-lite package variant
Signed-off-by: Ken Keys <kkeys@caida.org>
This commit is contained in:
parent
d9f3f92c39
commit
d078dbed7b
1 changed files with 40 additions and 10 deletions
|
@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=protobuf
|
PKG_NAME:=protobuf
|
||||||
PKG_VERSION:=3.3.0
|
PKG_VERSION:=3.3.0
|
||||||
PKG_RELEASE:=1
|
PKG_RELEASE:=2
|
||||||
|
|
||||||
PKG_SOURCE:=$(PKG_NAME)-cpp-$(PKG_VERSION).tar.gz
|
PKG_SOURCE:=$(PKG_NAME)-cpp-$(PKG_VERSION).tar.gz
|
||||||
PKG_SOURCE_URL:=https://github.com/google/protobuf/releases/download/v$(PKG_VERSION)
|
PKG_SOURCE_URL:=https://github.com/google/protobuf/releases/download/v$(PKG_VERSION)
|
||||||
|
@ -26,19 +26,43 @@ PKG_INSTALL:=1
|
||||||
include $(INCLUDE_DIR)/package.mk
|
include $(INCLUDE_DIR)/package.mk
|
||||||
include $(INCLUDE_DIR)/host-build.mk
|
include $(INCLUDE_DIR)/host-build.mk
|
||||||
|
|
||||||
define Package/protobuf
|
define Package/protobuf/Default
|
||||||
SECTION:=libs
|
SECTION:=libs
|
||||||
CATEGORY:=Libraries
|
CATEGORY:=Libraries
|
||||||
TITLE:=A structured data encoding library
|
TITLE:=A structured data encoding library
|
||||||
URL:=https://github.com/google/protobuf
|
URL:=https://github.com/google/protobuf
|
||||||
DEPENDS:=+zlib +libpthread +libstdcpp
|
DEPENDS:=+zlib +libpthread +libstdcpp
|
||||||
MAINTAINER:=Per Sandström <per.j.sandstrom@gmail.com>
|
MAINTAINER:=Ken Keys <kkeys@caida.org>
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Package/protobuf
|
||||||
|
$(call Package/protobuf/Default)
|
||||||
|
DEPENDS+=+protobuf-lite
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Package/protobuf-lite
|
||||||
|
$(call Package/protobuf/Default)
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Package/protobuf/description/Default
|
||||||
|
Protocol Buffers are a way of encoding structured data in an efficient
|
||||||
|
yet extensible format. Google uses Protocol Buffers for almost all
|
||||||
|
of its internal RPC protocols and file formats.
|
||||||
endef
|
endef
|
||||||
|
|
||||||
define Package/protobuf/description
|
define Package/protobuf/description
|
||||||
Protocol Buffers are a way of encoding structured data in an efficient
|
$(call Package/protobuf/description/Default)
|
||||||
yet extensible format. Google uses Protocol Buffers for almost all
|
|
||||||
of its internal RPC protocols and file formats.
|
This package provides the libprotoc, libprotobuf, and libprotobuf-lite
|
||||||
|
libraries. For a much smaller protobuf package, see "protobuf-lite".
|
||||||
|
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Package/protobuf-lite/description
|
||||||
|
$(call Package/protobuf/description/Default)
|
||||||
|
|
||||||
|
This package provides the libprotobuf-lite library.
|
||||||
|
|
||||||
endef
|
endef
|
||||||
|
|
||||||
CONFIGURE_ARGS += --with-protoc=$(STAGING_DIR_HOSTPKG)/bin/protoc
|
CONFIGURE_ARGS += --with-protoc=$(STAGING_DIR_HOSTPKG)/bin/protoc
|
||||||
|
@ -57,6 +81,15 @@ define Build/InstallDev
|
||||||
$(1)/usr/lib/
|
$(1)/usr/lib/
|
||||||
endef
|
endef
|
||||||
|
|
||||||
|
define Package/protobuf-lite/install
|
||||||
|
$(INSTALL_DIR) \
|
||||||
|
$(1)/usr/lib
|
||||||
|
|
||||||
|
$(CP) \
|
||||||
|
$(PKG_INSTALL_DIR)/usr/lib/libprotobuf-lite.so* \
|
||||||
|
$(1)/usr/lib/
|
||||||
|
endef
|
||||||
|
|
||||||
define Package/protobuf/install
|
define Package/protobuf/install
|
||||||
$(INSTALL_DIR) \
|
$(INSTALL_DIR) \
|
||||||
$(1)/usr/lib
|
$(1)/usr/lib
|
||||||
|
@ -65,14 +98,11 @@ define Package/protobuf/install
|
||||||
$(PKG_INSTALL_DIR)/usr/lib/libprotoc.so* \
|
$(PKG_INSTALL_DIR)/usr/lib/libprotoc.so* \
|
||||||
$(1)/usr/lib/
|
$(1)/usr/lib/
|
||||||
|
|
||||||
$(CP) \
|
|
||||||
$(PKG_INSTALL_DIR)/usr/lib/libprotobuf-lite.so* \
|
|
||||||
$(1)/usr/lib/
|
|
||||||
|
|
||||||
$(CP) \
|
$(CP) \
|
||||||
$(PKG_INSTALL_DIR)/usr/lib/libprotobuf.so* \
|
$(PKG_INSTALL_DIR)/usr/lib/libprotobuf.so* \
|
||||||
$(1)/usr/lib/
|
$(1)/usr/lib/
|
||||||
endef
|
endef
|
||||||
|
|
||||||
$(eval $(call BuildPackage,protobuf))
|
$(eval $(call BuildPackage,protobuf))
|
||||||
|
$(eval $(call BuildPackage,protobuf-lite))
|
||||||
$(eval $(call HostBuild))
|
$(eval $(call HostBuild))
|
||||||
|
|
Loading…
Reference in a new issue